Skip to content
Snippets Groups Projects
Commit 5af37c78 authored by Eugen Ciur's avatar Eugen Ciur
Browse files

minor adjustments

parent 481fde3e
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Papermerge</title>
<meta name="description" content="">
<meta name="description" content="Papermerge - document management system for digital archives">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{content-for "head"}}
......
......@@ -91,27 +91,31 @@ function ws_base_url() {
/*
websockets base url
*/
let base;
let base = `ws://${window.location.host}`;
if (window.location.protocol == "http:") {
base = `ws://${window.location.host}`;
} else if ( window.location.protocol == "https:" ) {
if (window.location.protocol == "https:") {
base = `wss://${window.location.host}`;
}
console.log(`base=${base}`);
if (!ENV.APP.WS_HOST) {
if (!ENV.APP.WS_NAMESPACE) {
console.log(`ws_base_url() = ${base}`);
return base;
}
console.log(`ws_base_url() = ${base}/${ENV.APP.WS_NAMESPACE}`);
return `${base}/${ENV.APP.WS_NAMESPACE}`;
}
if (!ENV.APP.WS_NAMESPACE) {
console.log(`ws_base_url() = ${ENV.APP.WS_HOST}`);
return `${ENV.APP.WS_HOST}`;
}
console.log(`ws_base_url() = ${ENV.APP.WS_HOST}/${ENV.APP.WS_NAMESPACE}`);
return `${ENV.APP.WS_HOST}/${ENV.APP.WS_NAMESPACE}`;
}
......
......@@ -52,6 +52,8 @@ module.exports = function (environment) {
if (environment === 'production') {
// here you can enable a production-specific feature
ENV.APP.HOST = 'http://papermerge.local';
ENV.APP.WS_HOST = 'ws://papermerge.local'
}
return ENV;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment