From 33e27d2e57a42a47642987750642f97981c93ee7 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 19 Oct 2017 20:49:14 +0100 Subject: [PATCH] "start:dist" script to run production build --- package.json | 3 ++- wsrv-config.js | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 wsrv-config.js diff --git a/package.json b/package.json index 71e5f5e53..ba8c637c2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build": "ng build", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "start:dist": "wsrv" }, "private": true, "dependencies": { diff --git a/wsrv-config.js b/wsrv-config.js new file mode 100644 index 000000000..45a802a66 --- /dev/null +++ b/wsrv-config.js @@ -0,0 +1,21 @@ +module.exports = { + "host": "0.0.0.0", + "port": 3000, + "dir": "./dist", + "spa": true, + "proxy": { + "/alfresco/{p*}": { + "options": { + "uri": "http://0.0.0.0:8080/alfresco/{p}" + } + } + }, + onResHeaders(headers) { + if (headers) { + const authHeader = headers['www-authenticate']; + if (authHeader) { + headers['www-authenticate'] = `x${authHeader}`; + } + } + } +}