Skip to content
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

Forward cdn-cgi/scripts paths to Cloudflare #422

Merged
merged 6 commits into from
Dec 22, 2022

Conversation

jstevans
Copy link
Contributor

@jstevans jstevans commented Nov 3, 2022

This addresses issue #421.

Right now, Miniflare 404s on attempts to download rocket-loader.min.js. For folks who've set up a Worker in front of Cloudflare Pages (e.g. to handle API requests on the same domain), this breaks their web app during local development: it renders as a white screen.

This PR adds a small amount of logic to simply forward those requests onto Cloudflare.

Right now, Miniflare 404s on attempts to download `rocket-loader.min.js`. For folks who've set up a Worker in front of Cloudflare Pages (e.g. to handle API requests on the same domain), this breaks their web app during local development: it renders as a white screen.

This PR adds a small amount of logic to simply forward those requests onto Cloudflare.
@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2022

⚠️ No Changeset found

Latest commit: 42fb5f3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! 👋 Thanks for the PR! Added a couple comments. 👍

packages/http-server/src/index.ts Outdated Show resolved Hide resolved
packages/http-server/src/index.ts Show resolved Hide resolved
jstevans and others added 2 commits November 23, 2022 12:14
@jstevans
Copy link
Contributor Author

Thanks for the feedback! I've done as suggested on both :)

Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for making those fixes, I've added a couple more, then we can merge this. 👍

packages/http-server/src/index.ts Outdated Show resolved Hide resolved
packages/http-server/src/index.ts Show resolved Hide resolved
packages/http-server/src/index.ts Outdated Show resolved Hide resolved
jstevans and others added 3 commits December 21, 2022 18:55
Co-authored-by: MrBBot <me@mrbbot.dev>
Co-authored-by: MrBBot <me@mrbbot.dev>
@jstevans
Copy link
Contributor Author

@mrbbot Done!

@mrbbot mrbbot merged commit b24707a into cloudflare:master Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants