partey_workadventure/front/src/Phaser
David Négrier 3dd2a634a0 Allowing loading HTTP local resources from a HTTPS endpoint.
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.
2021-04-11 14:56:03 +02:00
..
Components FEATURE: warning message when world is near full capacity 2021-03-23 17:44:47 +01:00
Entity FIX: player anims correctly stop on the idle frame 2021-03-11 16:21:02 +01:00
Game Allowing loading HTTP local resources from a HTTPS endpoint. 2021-04-11 14:56:03 +02:00
Items Removing pipeline related code 2021-01-27 11:18:07 +01:00
Login FEATURE: warning message when world is near full capacity 2021-03-23 17:44:47 +01:00
Map Adding the ability to register a single script using the "script" attribute at the map property level. 2021-03-07 21:02:38 +01:00
Menu Merge branch 'develop' of github.com:thecodingmachine/workadventure into iframe_api 2021-03-28 16:53:15 +02:00
Player FIX: player anims correctly stop on the idle frame 2021-03-11 16:21:02 +01:00
Reconnecting Disabling explicit any check on error handling 2021-01-18 15:36:02 +01:00
Shaders downgraded phaser version to 3.24.1 2021-01-28 23:03:06 +01:00
UserInput Minor changes 2021-03-28 16:36:02 +02:00