Webapp zur Darstellung von GREEN SPIDER Daten zu Websites
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.7 KiB

user nginx;
worker_processes 1;
error_log stderr warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
http {
proxy_cache_path /var/cache/nginx/cache-api keys_zone=api:1m;
proxy_cache_path /var/cache/nginx/cache-screenshots keys_zone=screenshots:1m;
upstream gs {
server storage.googleapis.com:443;
keepalive 128;
server {
listen *:8000;
location /api/ {
proxy_pass http://api:5000;
proxy_cache api;
proxy_cache_background_update on;
proxy_cache_lock on;
proxy_cache_lock_timeout 15s;
proxy_cache_use_stale updating;
proxy_cache_valid 200 5m;
proxy_cache_valid any 1m;
proxy_set_header X-Real-IP $remote_addr;
location /screenshots/ {
resolver ipv6=off;
rewrite /screenshots/(.*) /$1 break;
proxy_pass https://gs/green-spider-screenshots.sendung.de/$1;
proxy_http_version 1.1;
proxy_set_header Host storage.googleapis.com;
proxy_set_header Connection "";
proxy_intercept_errors on;
proxy_cache screenshots;
proxy_cache_background_update on;
proxy_cache_lock on;
proxy_cache_lock_timeout 5s;
proxy_cache_use_stale updating;
proxy_cache_valid 200 24h;
proxy_cache_valid any 3h;
proxy_hide_header alt-svc;
proxy_hide_header X-GUploader-UploadID;
proxy_hide_header alternate-protocol;
proxy_hide_header x-goog-hash;
proxy_hide_header x-goog-generation;
proxy_hide_header x-goog-metageneration;
proxy_hide_header x-goog-stored-content-encoding;
proxy_hide_header x-goog-stored-content-length;
proxy_hide_header x-goog-storage-class;
proxy_hide_header x-xss-protection;
proxy_hide_header accept-ranges;
proxy_hide_header Set-Cookie;
proxy_ignore_headers Set-Cookie;
location ~ ^/(?!(api|screenshots)) {
proxy_pass http://webapp:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" $request_time';
access_log /dev/stdout main;
sendfile on;
keepalive_timeout 65;