It's dependent on following basic financial principles. For a balanced budget, your housing expense should run around 30% of your gross income. That assumes you have no large debts that you are paying off etc.
A lender, running a debt to income ratio, will run at different rates depending on your other debt. Some of that might confuse the average person. Stick with the rule- no more than 30% of your gross income and you shouldn't have a problem. From there having 6 months in savings will hopefully protect you should any difficulties happen such as a job loss or out of work because of illness.