workadventure/front
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
..
dist FEATURE: improved the fullscreen and close buttons to be in the aside element 2021-03-31 18:39:51 +02:00
packages/iframe-api-typings Dynamically fetching correct version and generating declarations only for npm lib 2021-04-11 11:32:56 +02:00
src Allowing loading HTTP local resources from a HTTPS endpoint. 2021-04-11 14:56:03 +02:00
tests/Phaser/Game Improving urlify 2021-02-11 18:03:14 +01:00
.dockerignore Fixing Dockerfiles 2020-04-11 15:11:22 +02:00
.eslintrc.json Enabling stricter lint on front 2020-06-19 14:29:29 +02:00
.gitignore Template google analytics data 2021-01-19 12:17:05 +01:00
Dockerfile [Breaking change] UPLOADER_URL and ADMIN_URL are now true URLs (and not only host name) and API_URL is replaced by PUSHER_URL 2021-03-31 16:00:14 +02:00
jasmine.json Adding PlayerMovement class to interpolate/extrapolate position along tests (installing Jasmine) 2020-06-02 10:48:04 +02:00
LICENSE.txt Changing license to AGPL + Commons Clause 2020-06-09 10:17:21 +02:00
package.json added sass loader to the project and put the cowebsite style in its own sass file 2021-03-18 12:37:05 +01:00
templater.sh Fixing GA tag not included in play domain 2021-03-05 10:00:11 +01:00
tsconfig.json Dynamically fetching correct version and generating declarations only for npm lib 2021-04-11 11:32:56 +02:00
webpack.config.js Fixing broken live-reload 2021-03-31 16:20:21 +02:00
webpack.prod.js Sending the source map out of the main JS file to reduce size 2020-07-02 10:38:36 +02:00
yarn.lock Bump y18n from 4.0.0 to 4.0.1 in /front 2021-03-30 14:33:07 +00:00