diff --git a/app-config/nginx/nginx.conf b/app-config/nginx/nginx.conf index 0895e583..8104caa3 100644 --- a/app-config/nginx/nginx.conf +++ b/app-config/nginx/nginx.conf @@ -66,10 +66,20 @@ http { return 302 /auth/login; } + location @proxy_404_error_handler { + # Pass the request on to the webservice. Most likely the URI won't + # exist so we get a 404 from that service instead (good as the 404 + # pages are consistent). + proxy_pass http://cara-webservice:8080/$request_uri; + } + location /voila-server/ { + proxy_intercept_errors on; + # Anything under voila-server or expert-app is authenticated. auth_request /auth/probe; error_page 401 = @error401; + error_page 404 = @proxy_404_error_handler; # cara-app is the name of the voila server in each of docker-compose, # test-cara.web.cern.ch and cara.web.cern.ch.