Commit 8dc485f1 authored by Lukas Burgey's avatar Lukas Burgey

Nginx config: now with cache ttl and compression

parent 785bd35e
......@@ -27,6 +27,11 @@ server {
charset utf-8;
client_max_body_size 75M;
gzip on;
gzip_types text/plain application/javascript;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
ssl on;
ssl_certificate /etc/ssl/hdf-portal-dev.data.kit.edu/chain.pem;
ssl_trusted_certificate /etc/ssl/hdf-portal-dev.data.kit.edu/fullchain.pem;
......@@ -46,11 +51,21 @@ server {
root /home/feudal/feudalWebpage/dist;
index index.html;
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
location /backend/static {
alias /home/feudal/feudalBackend/static;
}
location /rest {
rewrite ^/rest/(.*)$ /backend/user-api/$1;
}
location /backend {
uwsgi_pass django;
include /home/feudal/config/uwsgi_params;
......@@ -67,10 +82,6 @@ server {
proxy_set_header Connection $connection_upgrade;
}
location /rest {
rewrite "^$" /backend/user-api;
}
location / {
if ($arg_idp) {
return 301 /backend/auth/v1/request$is_args$args;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment