fix: ALLOWED_HOSTS
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
IMAGE_TAG=latest
|
IMAGE_TAG=latest
|
||||||
MAIN_PORT=3000
|
MAIN_PORT=3000
|
||||||
|
NG_ALLOWED_HOSTS=fraujulian.xyz,www.fraujulian.xyz,test.fraujulian.xyz
|
||||||
|
|||||||
+4
-1
@@ -1,5 +1,5 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
portfolio:
|
||||||
image: docker.lechner-systems.at/lechnersystems/portfolio:${IMAGE_TAG}
|
image: docker.lechner-systems.at/lechnersystems/portfolio:${IMAGE_TAG}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@@ -7,5 +7,8 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
dns:
|
||||||
|
- 192.168.100.2
|
||||||
|
- 192.168.100.6
|
||||||
ports:
|
ports:
|
||||||
- ${MAIN_PORT}:3000
|
- ${MAIN_PORT}:3000
|
||||||
|
|||||||
+8
-1
@@ -10,9 +10,16 @@ import bootstrap from './main.server';
|
|||||||
const serverDistFolder: string = dirname(fileURLToPath(import.meta.url));
|
const serverDistFolder: string = dirname(fileURLToPath(import.meta.url));
|
||||||
const browserDistFolder: string = resolve(serverDistFolder, '../browser');
|
const browserDistFolder: string = resolve(serverDistFolder, '../browser');
|
||||||
const indexHtml: string = join(serverDistFolder, 'index.server.html');
|
const indexHtml: string = join(serverDistFolder, 'index.server.html');
|
||||||
|
const allowedHosts: readonly string[] = [
|
||||||
|
'fraujulian.xyz',
|
||||||
|
'www.fraujulian.xyz',
|
||||||
|
'test.fraujulian.xyz',
|
||||||
|
'localhost',
|
||||||
|
'127.0.0.1',
|
||||||
|
];
|
||||||
|
|
||||||
const app: Express = express();
|
const app: Express = express();
|
||||||
const commonEngine: CommonEngine = new CommonEngine();
|
const commonEngine: CommonEngine = new CommonEngine({ allowedHosts });
|
||||||
|
|
||||||
app.use(
|
app.use(
|
||||||
express.static(browserDistFolder, {
|
express.static(browserDistFolder, {
|
||||||
|
|||||||
Reference in New Issue
Block a user