3dd2a634a0
By default, maps are loaded in HTTPS if WorkAdventure is running in HTTPS, and in HTTP is WorkAdventure is running in HTTP. Also, if WorkAdventure is running in HTTP and map loading fails, we try map loading in HTTPS (useful when we are working on WorkAdventure locally and want to load a map on a secure domain). This commit adds the last combination: If WorkAdventure is running in HTTPS, and map loading fails in HTTPS **AND** if the map URL is targetting "localhost", "*.localhost" or "127.0.0.1", then we attempt to load the resource in HTTP. Why? "localhost" is considered secure context by modern browsers. So even if a page is loaded in HTTPS, it can load resources from any secure context (including localhost in HTTP). This means that from "https://play.workadventu.re", I can now test a map running locally on my machine (served by a classic webserver without any certificate). This change should make map testing easier, since map developers will not have to install the whole WorkAdventure project to test their map locally. |
||
---|---|---|
.. | ||
Components | ||
Entity | ||
Game | ||
Items | ||
Login | ||
Map | ||
Menu | ||
Player | ||
Reconnecting | ||
Shaders | ||
UserInput |