Skip to content
Snippets Groups Projects
Commit 21adfaee authored by paflov's avatar paflov
Browse files

Add server-directive to don't cache the index.html. This might hopefully fix...

Add server-directive to don't cache the index.html. This might hopefully fix the problems user's had after the testcenter was updated.

https://github.com/iqb-berlin/testcenter-frontend/issues/327
parent 5eca1915
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ CMD ng serve --disableHostCheck --host 0.0.0.0
FROM nginx:1.22.0-alpine as prod
COPY --from=dev /app/dist /usr/share/nginx/html
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
......
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /index.html {
root /usr/share/nginx/html;
add_header Cache-Control no-store;
expires 0;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
/* eslint-disable no-console */
import { Injectable } from '@angular/core';
import { Router, RouterState } from '@angular/router';
import {
......@@ -93,6 +94,7 @@ export class AuthInterceptor implements HttpInterceptor {
break;
default:
console.log(httpError);
label = 'Unbekanntes Verbindungsproblem';
}
if (!ignoreError) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment