You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when the server starts, the _redirections file gets loaded and the rules parsed.
If, during the time http-server has been running the _redirections file changes, those changes are not reflected as rule changes in the redirection system unless you restart http-server like, an index.html file served from the directory would normally change and its changes picked up.
We should be able to detect changes to the _redirections file or, alternatively, a way to let http-server know that file changed.
While I would prefer to detect changes to the file using a file watcher, I know finding a cross-platform solution is a bit challenging. We do have binaries for darwin, linux and windows (in ARM and x86_64 flavours) so we might just have to support those.
The other option described is to support a signal, a la Nginx or other servers where, if you send, say SIGUSR1 then you reload the _redirections file.
While in the past I've been against using watchers for configuration (I would prefer in those cases to get a fresh start), _redirections seems to warrant it more than others.
The caveat here is that if we detect changes on the file, and the file changes, and bad rules are configured, we should continue using the old rules but warn in the terminal that the rules file is invalid and we would continue to use the old rules.
The text was updated successfully, but these errors were encountered:
Currently, when the server starts, the
_redirections
file gets loaded and the rules parsed.If, during the time
http-server
has been running the_redirections
file changes, those changes are not reflected as rule changes in the redirection system unless you restarthttp-server
like, anindex.html
file served from the directory would normally change and its changes picked up.We should be able to detect changes to the
_redirections
file or, alternatively, a way to lethttp-server
know that file changed.While I would prefer to detect changes to the file using a file watcher, I know finding a cross-platform solution is a bit challenging. We do have binaries for
darwin
,linux
andwindows
(in ARM and x86_64 flavours) so we might just have to support those.The other option described is to support a signal, a la Nginx or other servers where, if you send, say
SIGUSR1
then you reload the_redirections
file.While in the past I've been against using watchers for configuration (I would prefer in those cases to get a fresh start),
_redirections
seems to warrant it more than others.The caveat here is that if we detect changes on the file, and the file changes, and bad rules are configured, we should continue using the old rules but warn in the terminal that the rules file is invalid and we would continue to use the old rules.
The text was updated successfully, but these errors were encountered: