-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
<Image> in SSR page response 404 when deploy Cloudflare Works #13825
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
Comments
Hi. Can you provide a minimal repro. Using a full site like the one you provided makes it hard for us to isolate the source of a problem. |
Hello @sgalcheung. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
I tried this React demo, still have this problem. I also created an issue to Cloudflare Support: https://community.cloudflare.com/t/cant-fetch-self-assert-in-workers/800037 This fetch method is here:
We try to fetch the image(https://balanced-chef.sgalwork.workers.dev/_astro/howm.Dr0NQRDu.jpg), but this is not successful. I guess this is a CF gateway problem; they can't fetch the self-hosted app assert. |
@ascorbic But this seems to be a Cloudflare Workers design feature; they need to use the
Therefore, we shouldn't use passthroughImageService; we should use a custom handler with |
I need to look at the example to fully understand the issue, but using internal bindings is always the better approach anyways. |
Hello, I added a mini-repo: astro-cloudflare-workers-demo. |
I have just created a Cloudflare Astro framework demo using
Then, I added the flag to astro-cloudflare-workers-demo, now it works well at /hello. Enable this feature, and the app will force all Or should we write code |
Interesting. That flag seems to be new. I still haven't had time to look into your code, sorry. |
I had the same problem before adding the flag |
Uh oh!
There was an error while loading. Please reload this page.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The image configuration is here
The image display is right in the dev.
Deploy page also works well: https://develop.balanced-chef.pages.dev/
But have trouble with CF works: https://balanced-chef.sgalwork.workers.dev/
for example fetch image: howm.Dr0NQRDu.jpg
The image URL is here: https://balanced-chef.sgalwork.workers.dev/_astro/howm.Dr0NQRDu.jpg
But _image endpoint return Not Found 404
What's the expected result?
Resolved the image.
Link to Minimal Reproducible Example
https://github.com/sgalcheung/balanced-chef
Participation
The text was updated successfully, but these errors were encountered: