nginx - how to functionally achieve an "internal 307 redirect" [duplicate]
Solution 1:
error_page code ... [=[response]] uri
edits the URI and method for the current level.
To not change the URI and method, just enter another context (named location).
error_page 405 = @fallback; location @fallback { return 200 $uri; }