The StaticRoute disallows serving files with a tilde (~) in them, even if the file is valid, like default~module.js
This is caused by the _DISALLOWED_CHARS_PATTERN regexp that contains the ~ char
|
_DISALLOWED_CHARS_PATTERN = re.compile('[\x00-\x1f\x80-\x9f\ufffd~?<>:*|\'"]') |
I cannot easily change the name of the file (since it is the output of the build command of an angular application).
I understand that the tilde can cause problems since it normally indicates the home of the user, but I think it falcon should accept its use if it refers to a valid file name.
As an alternative maybe the _DISALLOWED_CHARS_PATTERN could be made public, so that it's documented and an user can customize it if they so wishes
Thanks
The StaticRoute disallows serving files with a tilde (~) in them, even if the file is valid, like
default~module.jsThis is caused by the
_DISALLOWED_CHARS_PATTERNregexp that contains the~charfalcon/falcon/routing/static.py
Line 42 in 790d4e4
I cannot easily change the name of the file (since it is the output of the build command of an angular application).
I understand that the tilde can cause problems since it normally indicates the home of the user, but I think it falcon should accept its use if it refers to a valid file name.
As an alternative maybe the
_DISALLOWED_CHARS_PATTERNcould be made public, so that it's documented and an user can customize it if they so wishesThanks