-
Notifications
You must be signed in to change notification settings - Fork 925
Also handle next apps hosted on a subpath #9785
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
🦋 Changeset detectedLatest commit: deb55b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
@@ -272,6 +272,31 @@ describe("unit tests", async () => { | |||
expect(await response.text()).toBe("Blocked"); | |||
}); | |||
|
|||
it("blocks /_next/image requests with remote URLs when not fetched as image for next apps host not at the root", async () => { |
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.
Maybe:
it("blocks /_next/image requests with remote URLs when not fetched as image for next apps host not at the root", async () => { | |
it("blocks /base/path/_next/image requests with remote URLs when not fetched as image", async () => { |
I think using it.each
to parametrize the test by path would be nice here to remove duplication.
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, thanks!
Would be nice to use it.each
in tests
Next apps can be hosted on a subpath, i.e. not at the root, so we need to be a little more permissive with the path we check on.
14c4a2a
to
deb55b5
Compare
Next apps can be hosted on a subpath, i.e. not at the root, so we need to be a little more permissive with the path we check on.
Fixes #[insert GH or internal issue link(s)].
Describe your change...