diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a0032283..6af132c23 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,22 @@ the detailed section referring to by linking pull requests or issues.
#### Deployment Migration Notes
+## [v3.2.1] - 2024-04-18
+
+### Overview
+
+NGINX Config Fix
+
+### Detailed Changes
+
+#### Patch
+
+- Revert NGINX header changes because they disallow E2E testing of edc-ce
+
+#### Deployment Migration Notes
+
+_No special deployment migration steps required_
+
## [v3.2.0] - 2024-04-18
MDS Bufix Release
diff --git a/angular.json b/angular.json
index d5cd748f0..d48360c8f 100644
--- a/angular.json
+++ b/angular.json
@@ -51,21 +51,12 @@
"with": "src/environments/environment.prod.ts"
}
],
- "optimization": {
- "scripts": true,
- "styles": {
- "minify": true,
- "inlineCritical": false
- },
- "fonts": true
- },
"outputHashing": "all",
"sourceMap": {
"hidden": false,
"scripts": true,
"styles": true
- },
- "subresourceIntegrity": true
+ }
},
"development": {
"buildOptimizer": false,
diff --git a/docker/Dockerfile b/docker/Dockerfile
index db52dc298..affd0ca82 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -13,8 +13,6 @@ COPY --from=npm-install /app/node_modules /app/node_modules
COPY ./ /app/
RUN npm run ng build --no-progress --configuration=production
-RUN ./docker/generate-csp-hash.mjs dist/edc-demo-client/*.js > script-src.txt
-
# Stage 3: Serve app with nginx
FROM docker.io/nginxinc/nginx-unprivileged:1.25-alpine3.18
@@ -30,13 +28,6 @@ COPY docker/default.conf.template etc/nginx/templates/default.conf.template
# so that the automatic envsubst templating is not disabled.
COPY docker/99-generate-app-config.sh /docker-entrypoint.d/99-generate-app-config.sh
-# Mount the template from the build context and the hash list from the previous stage
-# instead of copying them, as they are not needed in the final image.
-RUN --mount=type=bind,from=build,source=/app/script-src.txt,target=/tmp/script-src.txt \
- --mount=type=bind,source=/docker/headers.include.template,target=/tmp/headers.include.template \
- env SCRIPT_SRC_EXTRA="$(cat /tmp/script-src.txt)" \
- envsubst '$$SCRIPT_SRC_EXTRA' < /tmp/headers.include.template > /etc/nginx/headers.include
-
RUN ln -sf /tmp/app-config.json /usr/share/nginx/html/assets/config/app-config.json \
# Nginx is configured to reject symlinks that point to a file owned by a different user, for security reasons
&& chown --no-dereference nginx:root /usr/share/nginx/html/assets/config/app-config.json
diff --git a/docker/default.conf.template b/docker/default.conf.template
index c6ef210ff..68979ad2c 100644
--- a/docker/default.conf.template
+++ b/docker/default.conf.template
@@ -10,16 +10,12 @@ server {
root /usr/share/nginx/html;
location / {
- add_header Cache-Control "public, immutable, max-age=604800";
- include headers.include;
-
index do-not-use-me.html;
try_files $uri @index;
}
location @index {
- add_header Cache-Control "no-cache";
- include headers.include;
+ add_header Cache-Control no-cache;
expires 0;
index index.html;
try_files /index.html =404;
diff --git a/docker/generate-csp-hash.mjs b/docker/generate-csp-hash.mjs
deleted file mode 100755
index 2c35ad9df..000000000
--- a/docker/generate-csp-hash.mjs
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env node
-import {createHash} from 'node:crypto';
-import {readFile} from 'node:fs/promises';
-
-async function hashFile(file) {
- const input = await readFile(file);
- // Angular uses sha384 for CSP hashes
- const hash = createHash('sha384').update(input).digest('base64');
-
- return `sha384-${hash}`;
-}
-
-const files = process.argv.slice(2);
-const hashes = await Promise.all(files.map(hashFile));
-
-// CSP hashes must be surrounded by single quotes
-console.log(hashes.map((s) => `'${s}'`).join(' '));
diff --git a/docker/headers.include.template b/docker/headers.include.template
deleted file mode 100644
index ddb44e84a..000000000
--- a/docker/headers.include.template
+++ /dev/null
@@ -1,47 +0,0 @@
-# Documentation of individual directives:
-# - default-src: fallback if a more specific directive is not given; 'self' allows resources from the same origin
-# - base-uri: restricts the URLs that can be used in a document's element; 'self' allows resources from the same origin
-# - script-src: controls