This is a cry for help.

Has anybody on Fedi put OpenStack Swift behind an nginx reverse proxy successfully before?

All the docs seem to suggest it should “just work” but I get 401s on preflight checks to upload media through the reverse proxy, and it works fine direct. I’m forwarding the X-Real-IP etc and swift is recognising that.

My next step is to just futz around with the proxy forward headers in the hope that something will help, but I can’t find any docs to actually address this situation. It’s weird.

Also this is a legacy system running an old version from 2014, so that might contribute. The goal is to have the up-to-date nginx RP doing SSL termination so as to change as little as possible of the config in this legacy mess.

@s0 (Assuming I'm understanding the issue you're having correctly):

nginx limits the size of requests by default to levels that block most uploads, so in the nginx config, in the server {} section and possibly location {} sections within (ie more than once), you'll need to add a line:

client_max_body_size 50M;

(Or higher if you foresee yourself uploading files larger than 50M)

@poundquerydotinfo I don’t think that’s the issue, as it’s the HTTP OPTIONS preflight request that’s returning 401 — this is done before attempting to submit a request with actual body data. Following that, the upload itself is also chunked into smaller PUTs that shouldn’t cause an issue.