Enable CORS for custom port
This commit is contained in:
parent
7edc6d4f60
commit
eac3b9d6e1
4 changed files with 10 additions and 4 deletions
|
@ -29,6 +29,7 @@ services:
|
|||
- TIPI_VERSION=${TIPI_VERSION}
|
||||
- JWT_SECRET=${JWT_SECRET}
|
||||
- ROOT_FOLDER_HOST=${ROOT_FOLDER_HOST}
|
||||
- NGINX_PORT=${NGINX_PORT}
|
||||
networks:
|
||||
- tipi_main_network
|
||||
|
||||
|
|
|
@ -11,13 +11,13 @@ interface IConfig {
|
|||
|
||||
dotenv.config();
|
||||
|
||||
const { NODE_ENV = 'development', JWT_SECRET = '', INTERNAL_IP = '', TIPI_VERSION = '', ROOT_FOLDER_HOST = '' } = process.env;
|
||||
const { NODE_ENV = 'development', JWT_SECRET = '', INTERNAL_IP = '', TIPI_VERSION = '', ROOT_FOLDER_HOST = '', NGINX_PORT = '80' } = process.env;
|
||||
|
||||
const config: IConfig = {
|
||||
NODE_ENV,
|
||||
ROOT_FOLDER: '/tipi',
|
||||
JWT_SECRET,
|
||||
CLIENT_URLS: ['http://localhost:3000', `http://${INTERNAL_IP}`, `http://${INTERNAL_IP}:3000`],
|
||||
CLIENT_URLS: ['http://localhost:3000', `http://${INTERNAL_IP}`, `http://${INTERNAL_IP}:${NGINX_PORT}`, `http://${INTERNAL_IP}:3000`],
|
||||
VERSION: TIPI_VERSION,
|
||||
ROOT_FOLDER_HOST,
|
||||
};
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
ansible
|
|
@ -217,6 +217,12 @@ cat <<"EOF"
|
|||
| {__)
|
||||
()`
|
||||
EOF
|
||||
|
||||
port_display=""
|
||||
if [[ $NGINX_PORT != "80" ]]; then
|
||||
port_display=":${NGINX_PORT}"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Visit http://${INTERNAL_IP}/ to view the dashboard"
|
||||
echo "Visit http://${INTERNAL_IP}${port_display}/ to view the dashboard"
|
||||
echo ""
|
||||
|
|
Loading…
Add table
Reference in a new issue