We demonstrate computational spectral-domain ghost imaging by encoding complementary Fourier patterns directly onto the spectrum of a superluminescent laser diode using a programmable spectral filter. Spectral encoding before the object enables uniform spectral illumination across the beam profile, removing the need for light collection optics and yielding increased signal-to-noise ratio. In addition, the use of complementary Fourier patterns allows reduction of deleterious of parasitic light effects. As a proof-of-concept, we measure the wavelength-dependent transmission of a Michelson interferometer and a wavelength-division multiplexer. Our results open new perspectives for remote broadband spectral measurements.Peer reviewe