godotengine / godot-asset-library

PHP frontend for Godot Engine's asset library
https://godotengine.org/asset-library
MIT License
291 stars 86 forks source link

Replace occurences of $_SERVER['HTTP_HOST'] with Uri::getHost() #187

Closed merumelu closed 5 years ago

merumelu commented 5 years ago

I was running the asset library on localhost:8000 and Firefox did just not set the token cookie at all, making login impossible. Turns out $_SERVER['HTTP_HOST'] includes the port, while the Domain part in the Set-Cookie header should not. Using $uri->getHost() fixes this.

Other occurences where URL building happened were streamlined to only use Uri methods as well.

bojidar-bg commented 5 years ago

Thanks!