Improvements to URL handling in the webapp allowing for SSL (when behind a proxy) #104296
@ -12,7 +12,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --port 8081 --base /app/",
|
"dev": "vite --port 8081 --base /app/ --mode development",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview --port 5050",
|
"preview": "vite preview --port 5050",
|
||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
let url = new URL(window.location.href);
|
let url = new URL(window.location.href);
|
||||||
// Uncomment this when the web interface is running on a different port than the
|
|
||||||
// API, for example when using the Vite devserver. Set the API port here.
|
// When using Vite development mode, access the API on port 8080.
|
||||||
// if (url.port == '8081') {
|
if (import.meta.env.MODE == 'development') {
|
||||||
// url.port = '8080';
|
url.port = '8080';
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
console.log(import.meta.env.MODE);
|
||||||
|
|
||||||
const URLs = {
|
const URLs = {
|
||||||
api: `${url.protocol}//${url.hostname}:${url.port}/`,
|
api: `${url.protocol}//${url.hostname}:${url.port}/`,
|
||||||
|
Loading…
Reference in New Issue
Block a user