mirror of
https://github.com/spacedeck/spacedeck-open.git
synced 2025-12-16 01:47:30 +01:00
fix session token/cookie handling for arbitrary server IPs; fix realtime update distribution via websockets
This commit is contained in:
@@ -22,29 +22,13 @@
|
||||
window.browser_lang = '[[locale]]';
|
||||
window.csrf_token = '[[csrf_token]]';
|
||||
|
||||
{% if process.env.NODE_ENV != "production" %}
|
||||
var ENV = {
|
||||
name: 'development',
|
||||
webHost: "localhost:9666",
|
||||
webEndpoint:"http://localhost:9666",
|
||||
apiEndpoint: "http://localhost:9666",
|
||||
websocketsEndpoint: "ws://localhost:9666"
|
||||
};
|
||||
{% else %}
|
||||
var ENV = {
|
||||
name: 'production',
|
||||
webHost: location.host,
|
||||
webEndpoint: location.origin,
|
||||
apiEndpoint: location.origin,
|
||||
websocketsEndpoint: location.origin.replace("https:","wss:").replace("http:","ws:")
|
||||
};
|
||||
{% endif %}
|
||||
|
||||
{% if subdomain_team %}
|
||||
var subdomainTeam = [[ subdomain_team | json | safe ]];
|
||||
{% else %}
|
||||
var subdomainTeam = null;
|
||||
{% endif %}
|
||||
var ENV = {
|
||||
name: 'development',
|
||||
webHost: location.host,
|
||||
webEndpoint: location.origin,
|
||||
apiEndpoint: location.origin,
|
||||
websocketsEndpoint: location.origin.replace("https:","wss:").replace("http:","ws:")
|
||||
};
|
||||
</script>
|
||||
|
||||
{% if process.env.NODE_ENV == "production" %}
|
||||
|
||||
Reference in New Issue
Block a user