Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This came up as part of my [Docker setup testing](#1206 (comment)) where I don't have `https` set up. I think it makes sense to follow whichever origin (protocol, host, and port) was used to reach the page in the first place. The code already uses `location.host` and gets the port instead of hardcoding 443. MDN shows this feature is widely supported by browsers: https://developer.mozilla.org/en-US/docs/Web/API/Location/origin The real `nginx` file redirects all requests to HTTPS so this change does not affect any real traffic. When testing with my `http` setup this fixes: - flight list export buttons (CSV and KML) - settings page backup button - sign-up page new profile URL (display only, it's not a link since the profile doesn't exist yet) I haven't been able to reproduce the `case 2:` behavior from the [login function](https://github.com/jpatokal/openflights/blob/master/openflights.js#L2962). I believe this is meant to reset the language from whatever was set prior to login to the user's settings-defined language. Still, it does not work the way I described it above on `openflights.org` either.
- Loading branch information