mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
vue: allow both http and https configuration (#2)
This closes #2 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
05de01c844
commit
4c1de537a7
7
ui/.env.local.https.example
Normal file
7
ui/.env.local.https.example
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
CS_URL=http://localhost:8080
|
||||||
|
PUBLIC_HOST=primate.example.com
|
||||||
|
HTTPS_CERT=/etc/ssl/certs/primate.example.com.pem
|
||||||
|
HTTPS_KEY=/etc/ssl/private/primate.example.com.key
|
||||||
|
HTTPS_CA=/etc/ssl/certs/ca.pem
|
||||||
|
HTTPS_DHPARAM=/etc/ssl/keys/dh2048.pem
|
||||||
|
ALLOWED_HOSTS=["primate.example.com","cloud.example.com"]
|
||||||
@ -30,6 +30,8 @@ Override the default `CS_URL` to a running CloudStack management server:
|
|||||||
cp .env.local.example .env.local
|
cp .env.local.example .env.local
|
||||||
Change the `CS_URL` in the `.env.local` file
|
Change the `CS_URL` in the `.env.local` file
|
||||||
|
|
||||||
|
To configure https, you may use `.env.local.https.example`.
|
||||||
|
|
||||||
Build and run:
|
Build and run:
|
||||||
|
|
||||||
npm start
|
npm start
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
|
const fs = require('fs')
|
||||||
|
|
||||||
function resolve (dir) {
|
function resolve (dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
@ -114,7 +115,15 @@ module.exports = {
|
|||||||
ws: false,
|
ws: false,
|
||||||
changeOrigin: true
|
changeOrigin: true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
https: process.env.HTTPS_KEY ? {
|
||||||
|
key: process.env.HTTPS_KEY ? fs.readFileSync(process.env.HTTPS_KEY) : undefined,
|
||||||
|
cert: process.env.HTTPS_CERT ? fs.readFileSync(process.env.HTTPS_CERT) : undefined,
|
||||||
|
ca: process.env.HTTPS_CA ? fs.readFileSync(process.env.HTTPS_CA) : undefined,
|
||||||
|
dhparam: process.env.HTTPS_DHPARAM ? fs.readFileSync(process.env.HTTPS_DHPARAM) : undefined
|
||||||
|
} : false,
|
||||||
|
public: process.env.PUBLIC_HOST || undefined,
|
||||||
|
allowedHosts: process.env.ALLOWED_HOSTS ? JSON.parse(process.env.ALLOWED_HOSTS) : undefined
|
||||||
},
|
},
|
||||||
|
|
||||||
lintOnSave: undefined,
|
lintOnSave: undefined,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user