yesodweb / wai

Haskell Web Application Interface
MIT License
834 stars 263 forks source link

wai-app-static: Allow accessing .well-known #1008

Open dpwiz opened 1 month ago

dpwiz commented 1 month ago

Currently the static app can't be used to serve Let'sEncrypt challenges as it refuses to serve hidden files. While it is possible to provide custom ssLookupFile, making such a function is quite inconvenient as it implies building the File object. A simple flag to allow the directory or a list of allowed prefixes would be much nicer.

Vlix commented 3 weeks ago

Could you link to the code section that filters out hidden files?

dpwiz commented 3 weeks ago

@Vlix https://github.com/yesodweb/wai/blob/b6bc2b6c5ab93a1fb629aaa70477ebf7f4959f1b/wai-app-static/WaiAppStatic/Storage/Filesystem.hs#L196