Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

🐛 Fix 403 errors when the url points to a directory without an index.html #5

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

jchorl
Copy link
Contributor

@jchorl jchorl commented May 27, 2020

Currently if your static dir looks like

/index.html
/assets/asset.jpg

and you request /assets, nginx tries to serve the directory and 403s. I can't think of a use case where a frontend nginx would serve a directory - can we just remove this?

See https://stackoverflow.com/a/38046124

@tiangolo tiangolo changed the title don't try directories on request 🐛 Fix 403 errors when the url points to a directory without an index.html Mar 17, 2024
@tiangolo tiangolo added bug Something isn't working and removed investigate labels Mar 17, 2024
@tiangolo tiangolo merged commit a6a6a76 into tiangolo:master Mar 17, 2024
@tiangolo
Copy link
Owner

You're right, thank you! ☕ Sorry for the long delay with this! 🤓

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants