Created
October 7, 2023 13:01
-
-
Save raucao/0aa1c59a1b3902b2a7a7ff925f0c32d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
if ($request_method = OPTIONS) { | |
add_header Content-Length 0; | |
add_header Content-Type text/plain; | |
return 200; | |
} | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
proxy_max_temp_file_size 0; | |
proxy_pass http://s3_backend; | |
header_filter_by_lua_block { | |
if ngx.req.get_method() == "PUT" and ngx.status == ngx.HTTP_OK then | |
ngx.status = ngx.HTTP_CREATED | |
end | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment