It's a form of discrimination though admittedly not the most egregious form of discrimination. The HUD has explicit regulations and guidelines involving "Selective use of advertising media or content" and "Selective geographic advertisements".
The legal threshold for discrimination is set a lot lower for housing than it is in other scenarios For good reason too -- the consequences of discriminated, for example, at a coffee shop are far less impactful than being discriminated for what housing you can find and obtain.