File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1+ CS_URL=http://localhost:8080
2+ PUBLIC_HOST=primate.example.com
3+ HTTPS_CERT=/etc/ssl/certs/primate.example.com.pem
4+ HTTPS_KEY=/etc/ssl/private/primate.example.com.key
5+ HTTPS_CA=/etc/ssl/certs/ca.pem
6+ HTTPS_DHPARAM=/etc/ssl/keys/dh2048.pem
7+ ALLOWED_HOSTS=["primate.example.com","cloud.example.com"]
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ Override the default `CS_URL` to a running CloudStack management server:
3030 cp .env.local.example .env.local
3131 Change the `CS_URL` in the `.env.local` file
3232
33+ To configure https, you may use ` .env.local.https.example ` .
34+
3335Build and run:
3436
3537 npm start
Original file line number Diff line number Diff line change 1717
1818const path = require ( 'path' )
1919const webpack = require ( 'webpack' )
20+ const fs = require ( 'fs' )
2021
2122function resolve ( dir ) {
2223 return path . join ( __dirname , dir )
@@ -114,7 +115,15 @@ module.exports = {
114115 ws : false ,
115116 changeOrigin : true
116117 }
117- }
118+ } ,
119+ https : process . env . HTTPS_KEY ? {
120+ key : process . env . HTTPS_KEY ? fs . readFileSync ( process . env . HTTPS_KEY ) : undefined ,
121+ cert : process . env . HTTPS_CERT ? fs . readFileSync ( process . env . HTTPS_CERT ) : undefined ,
122+ ca : process . env . HTTPS_CA ? fs . readFileSync ( process . env . HTTPS_CA ) : undefined ,
123+ dhparam : process . env . HTTPS_DHPARAM ? fs . readFileSync ( process . env . HTTPS_DHPARAM ) : undefined
124+ } : false ,
125+ public : process . env . PUBLIC_HOST || undefined ,
126+ allowedHosts : process . env . ALLOWED_HOSTS ? JSON . parse ( process . env . ALLOWED_HOSTS ) : undefined
118127 } ,
119128
120129 lintOnSave : undefined ,
You can’t perform that action at this time.
0 commit comments