workadventure/front/src/Phaser/Game
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
..
AddPlayerInterface.ts All player textures are now lazy-loaded 2021-01-08 11:44:41 +01:00
GameManager.ts FIX: help camera settings popup now only show up once 2021-03-24 15:59:18 +01:00
GameMap.ts Fix last properties changed after trigger change position 2021-02-18 11:32:37 +01:00
GameScene.ts Allowing loading HTTP local resources from a HTTPS endpoint. 2021-04-11 14:56:03 +02:00
PlayerMovement.ts rewrote the login workflow 2020-09-25 19:23:33 +02:00
PlayersPositionInterpolator.ts Migrating userId to "int32" to save some space and adding userMoves message in protobuf 2020-09-18 13:57:38 +02:00