Serve static files via wai-app-static#368
Open
cocreature wants to merge 1 commit intondmitchell:masterfrom
Open
Serve static files via wai-app-static#368cocreature wants to merge 1 commit intondmitchell:masterfrom
cocreature wants to merge 1 commit intondmitchell:masterfrom
Conversation
After pondering ndmitchell#367 for a while, this seemed like a nicer solution than providing an option to disable this: wai-app-static is pretty battletested at this point, it’s well maintained, has relatively few dependencies and it provides some extra functionality around caching which may be useful. That way, we avoid our own validation logic which was broken several times and I’m not surprised if it’s broken again. This PR does not address haddock: and file: links. Those deliberately do not limit paths but they are also disabled by default so from a security pov this is less of an issue.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
After pondering #367 for a while, this seemed like a nicer solution
than providing an option to disable this:
wai-app-static is pretty battletested at this point, it’s well
maintained, has relatively few dependencies and it provides some extra
functionality around caching which may be useful.
That way, we avoid our own validation logic which was broken several
times and I’m not surprised if it’s broken again.
This PR does not address haddock: and file: links. Those deliberately
do not limit paths but they are also disabled by default so from a
security pov this is less of an issue.
Thanks for the pull request!
By raising this pull request you confirm you are licensing your contribution under all licenses that apply to this project (see LICENSE) and that you have no patents covering your contribution.
If you care, my PR preferences are at https://github.com/ndmitchell/neil#contributions, but they're all guidelines, and I'm not too fussy - you don't have to read them.