Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: Due to the way the
envsubst
in this container's startup process rewrites the nginx template file, we couldn't pass any '$' characters to be preserved in the rendered nginx/conf.d/default.conf file (such as $scheme). So we created an envar with the NGINX rewrite target for 404 as a quoted string rather than a literal within the nginx-template.conf file. This container envar is rendered byenvsubst
to become a string in the NGINX configuration containing NGINX variables such as '$scheme' and '$host' to specify the redirection target. The actual /usr/share/nginx/html/404.html is no longer used although it hasn't been removed from the base layer.Previous logic rendered the 404.html static page in-place that created subsequent 404 redirects for assets expected to be along the original URL path, causing requests such as /x/y/z.html to result in /x/y/404.html which didn't have the context for the assets.