remove old, fix nginx
This commit is contained in:
@@ -8,9 +8,6 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
}
|
|
||||||
|
|
||||||
location ~ ^/[@_]/ {
|
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,6 @@ export const CONTACT_URL = process.env.CONTACT_URL || undefined;
|
|||||||
export const PROFILE_URL = process.env.PROFILE_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_API_KEY: string = process.env.POSTHOG_API_KEY as string || '';
|
||||||
export const POSTHOG_URL = process.env.POSTHOG_URL || undefined;
|
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;
|
export const isMobile = (): boolean => window.innerWidth <= 800 || window.innerHeight <= 600;
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ import { requestedCameraState, requestedMicrophoneState } from "../../Stores/Med
|
|||||||
import { helpCameraSettingsVisibleStore } from "../../Stores/HelpCameraSettingsStore";
|
import { helpCameraSettingsVisibleStore } from "../../Stores/HelpCameraSettingsStore";
|
||||||
import { menuIconVisiblilityStore } from "../../Stores/MenuStore";
|
import { menuIconVisiblilityStore } from "../../Stores/MenuStore";
|
||||||
import { emoteMenuVisiblilityStore } from "../../Stores/EmoteStore";
|
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
|
* This class should be responsible for any scene starting/stopping
|
||||||
@@ -40,21 +36,6 @@ export class GameManager {
|
|||||||
this.startRoom = await connectionManager.initGameConnexion();
|
this.startRoom = await connectionManager.initGameConnexion();
|
||||||
this.loadMap(this.startRoom);
|
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 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 Room si not public and Auth was not set, show login scene to authenticate user (OpenID - SSO - Anonymous)
|
||||||
if (!this.playerName || !localUserStore.getAuthToken()) {
|
if (!this.playerName || !localUserStore.getAuthToken()) {
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import { adminApi } from "../Services/AdminApi";
|
|||||||
import { AuthTokenData, jwtTokenManager } from "../Services/JWTTokenManager";
|
import { AuthTokenData, jwtTokenManager } from "../Services/JWTTokenManager";
|
||||||
import { parse } from "query-string";
|
import { parse } from "query-string";
|
||||||
import { openIDClient } from "../Services/OpenIDClient";
|
import { openIDClient } from "../Services/OpenIDClient";
|
||||||
import { FRONT_URL, DEBUG_IGNORE_SSL, DISABLE_ANONYMOUS } from "../Enum/EnvironmentVariable"
|
import { DEBUG_IGNORE_SSL, DISABLE_ANONYMOUS } from "../Enum/EnvironmentVariable"
|
||||||
import Axios from "axios";
|
|
||||||
import { AxiosRequestConfig } from "axios";
|
import { AxiosRequestConfig } from "axios";
|
||||||
import https from "https";
|
import https from "https";
|
||||||
|
|
||||||
@@ -189,12 +188,6 @@ export class AuthenticateController extends BaseController {
|
|||||||
axiosConfig.httpsAgent = agent;
|
axiosConfig.httpsAgent = agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await Axios.get(FRONT_URL, axiosConfig);
|
|
||||||
|
|
||||||
if (response.headers[ 'bstlyuserid' ]) {
|
|
||||||
userUuid = response.headers[ 'bstlyuserid' ];
|
|
||||||
}
|
|
||||||
|
|
||||||
const authToken = jwtTokenManager.createAuthToken(userUuid);
|
const authToken = jwtTokenManager.createAuthToken(userUuid);
|
||||||
res.writeStatus("200 OK");
|
res.writeStatus("200 OK");
|
||||||
this.addCorsHeaders(res);
|
this.addCorsHeaders(res);
|
||||||
|
|||||||
Reference in New Issue
Block a user