remove old, fix nginx

This commit is contained in:
_Bastler 2021-09-17 10:23:00 +02:00
parent 0bf49fa26a
commit f053ece7da
4 changed files with 1 additions and 31 deletions

View File

@ -8,9 +8,6 @@ server {
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location ~ ^/[@_]/ {
try_files $uri $uri/ /index.html;
}
}

View File

@ -22,7 +22,6 @@ export const CONTACT_URL = process.env.CONTACT_URL || undefined;
export const PROFILE_URL = process.env.PROFILE_URL || undefined;
export const POSTHOG_API_KEY: string = process.env.POSTHOG_API_KEY as string || '';
export const POSTHOG_URL = process.env.POSTHOG_URL || undefined;
export const DEBUG_IGNORE_SSL = process.env.DEBUG_IGNORE_SSL ? process.env.DEBUG_IGNORE_SSL == "true" : false;
export const isMobile = (): boolean => window.innerWidth <= 800 || window.innerHeight <= 600;

View File

@ -10,10 +10,6 @@ import { requestedCameraState, requestedMicrophoneState } from "../../Stores/Med
import { helpCameraSettingsVisibleStore } from "../../Stores/HelpCameraSettingsStore";
import { menuIconVisiblilityStore } from "../../Stores/MenuStore";
import { emoteMenuVisiblilityStore } from "../../Stores/EmoteStore";
import { DEBUG_IGNORE_SSL } from "../../Enum/EnvironmentVariable";
import Axios from "axios";
import { AxiosRequestConfig } from "axios";
import https from "https";
/**
* This class should be responsible for any scene starting/stopping
@ -40,21 +36,6 @@ export class GameManager {
this.startRoom = await connectionManager.initGameConnexion();
this.loadMap(this.startRoom);
if (!this.playerName) {
const axiosConfig: AxiosRequestConfig = {};
if (DEBUG_IGNORE_SSL) {
const agent = new https.Agent({
rejectUnauthorized: false,
});
axiosConfig.httpsAgent = agent;
}
const response = await Axios.get("/", axiosConfig);
this.playerName = response.headers[ 'bstlyusername' ];
}
//If player name was not set show login scene with player name
//If Room si not public and Auth was not set, show login scene to authenticate user (OpenID - SSO - Anonymous)
if (!this.playerName || !localUserStore.getAuthToken()) {

View File

@ -5,8 +5,7 @@ import { adminApi } from "../Services/AdminApi";
import { AuthTokenData, jwtTokenManager } from "../Services/JWTTokenManager";
import { parse } from "query-string";
import { openIDClient } from "../Services/OpenIDClient";
import { FRONT_URL, DEBUG_IGNORE_SSL, DISABLE_ANONYMOUS } from "../Enum/EnvironmentVariable"
import Axios from "axios";
import { DEBUG_IGNORE_SSL, DISABLE_ANONYMOUS } from "../Enum/EnvironmentVariable"
import { AxiosRequestConfig } from "axios";
import https from "https";
@ -189,12 +188,6 @@ export class AuthenticateController extends BaseController {
axiosConfig.httpsAgent = agent;
}
const response = await Axios.get(FRONT_URL, axiosConfig);
if (response.headers[ 'bstlyuserid' ]) {
userUuid = response.headers[ 'bstlyuserid' ];
}
const authToken = jwtTokenManager.createAuthToken(userUuid);
res.writeStatus("200 OK");
this.addCorsHeaders(res);