typicode / hotel

🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
MIT License
9.98k stars 422 forks source link

[FEATURE] HTTP_X_FORWARDED headers #144

Closed natrim closed 8 years ago

natrim commented 8 years ago

Would be nice if the proxy would send FORWARDED to the backend.

HTTP_X_FORWARDED_FOR HTTP_X_FORWARDED_HOST HTTP_X_FORWARDED_PORT

( why: i use hotel add 'php -S 127.0.0.1:$PORT' but when i want to redirect to the local url then $_SERVER['SERVER_PORT'] contains the php port (something like 55885) and $_SERVER['SERVER_NAME'] contains 127.0.0.1 which means it will redirect to wrong url having the HTTP_X_FORWARDED allows the application to know the right ip and port )

typicode commented 8 years ago

Hi @natrim,

Good idea :+1: I'll add it

typicode commented 8 years ago

I've configured the proxy to add some headers, it was just an option actually, so you should get more headers now. It's available in v0.5.11.

I couldn't test it, so feedbacks are welcome :)

natrim commented 8 years ago

Thanks, works now.