worker_processes 1; events { worker_connections 1024; } http { server { listen *:8080; client_max_body_size 0; set $allowOriginSite *; proxy_pass_request_headers on; proxy_pass_header Set-Cookie; # External settings, do not remove #ENV_ACCESS_LOG proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass_header Set-Cookie; # Protect access to SOLR APIs location ~ ^(/.*/service/api/solr/.*)$ {return 403;} location ~ ^(/.*/s/api/solr/.*)$ {return 403;} location ~ ^(/.*/wcservice/api/solr/.*)$ {return 403;} location ~ ^(/.*/wcs/api/solr/.*)$ {return 403;} location ~ ^(/.*/proxy/alfresco/api/solr/.*)$ {return 403 ;} location ~ ^(/.*/-default-/proxy/alfresco/api/.*)$ {return 403;} # Protect access to Prometheus endpoint location ~ ^(/.*/s/prometheus)$ {return 403;} location / { proxy_pass http://platform:8080; } location /alfresco/ { proxy_pass http://platform:8080; # If using external proxy / load balancer (for initial redirect if no trailing slash) absolute_redirect off; } } }