- Potentially breaking: Treat HTTP
HEAD
requests like HTTPGET
requests. This one is potentially breaking and we therefore released a new major version to be on the safe side. Most projects should not encounter issues when upgrading to this version. Contributed by @awwit.
- Recommend absolute paths for rewrite targets. Contributed by @helfi92.
- Expose the HTTP request object in rewrite rules. Contributed by @VladShcherbin.
- The
.
(DOT) rule should only check the last path element. Contributed by @ntkme.
- Allow disabling of the
.
(DOT) rule via thedisableDotRule
option.
- Support definition of custom HTML
Accept
header values. Contributed by @cgmartin.
- Rewrite rules are now applied before the request URL is checked for dots.
- Rewrite rules can be defined as functions to have greater control over the
dot rule
.
This version introduces a fair amount of breaking changes. Specifically, instances of the historyApiFallback need to be created via the exported function. Previously, this was not necessary.
- Breaking: Support multiple instances of the historyApiFallback middleware with different configurations.
- Breaking: Loggers are configured per historyApiFallback middleware instance (see
README.md
). - The fallback index HTML file can be configured. Default is
/index.html
. - Additional rewrite rules can be defined via regular expressions.