-
Notifications
You must be signed in to change notification settings - Fork 86
fix: don't move files to the CDN if they match redirect/rewrite rules #832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Release-As: 4.0.0-beta.10
a86ab58
to
aa17745
Compare
@@ -1,4 +1,4 @@ | |||
// @ts-check | |||
/* eslint-disable max-lines */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[sand] We should probably avoid disabling eslint and separate this file into smaller ones moving forward
exports.matchMiddleware = matchMiddleware | ||
exports.stripLocale = stripLocale | ||
exports.isDynamicRoute = isDynamicRoute | ||
|
||
// eslint-disable-next-line max-lines-per-function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[sand] Same for eslint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
Ensures that if a file would match a redirect or
beforeFiles
rewrite, it isn;t served from the CDN as that would prevent the rule from being applied. We could potentially be smarter and check if we can represent the rule using Netlify redirects, but that would be quite complicated to achieve and wouldn't work for lots of scenariosTest plan
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Fixes #819