Replies: 7 comments 7 replies
-
Would you want this to be the same for all URLs? Also, is this because you are hosting your site on a different subdomain as your assets? |
Beta Was this translation helpful? Give feedback.
-
+1 for this or astro could set some cache-policy/expires/max-age on assets in public directory. currently cloudflare cache always shows EXPIRED because files in public directory have max-age=0:
|
Beta Was this translation helpful? Give feedback.
-
I also encountered the same problem. The purpose of this is to reduce the pressure of the main service and transfer the requests of static resources to the CDN server. This is a very common solution in a large traffic website. VITEThe base option originally supported a complete HTTPS link, but the settings in ASTRO are invalid, and there is no entrance to solve this problem |
Beta Was this translation helpful? Give feedback.
-
The same problem for me. In our case, we're slowly migrating from the existing app to Astro. We have configured NGINX so some URLs point to our old app (Django) and other URLs are just static serving of the Astro. We can't host the Astro app on a CDN entirely because we want the same domain for both types of URLs. |
Beta Was this translation helpful? Give feedback.
-
Require this feature to deploy more applications. |
Beta Was this translation helpful? Give feedback.
-
We have discussed and accepted the proposal! Thanks everyone for chiming in to give feedback and presented the usecase. This has been moved to stage 2 at #534 |
Beta Was this translation helpful? Give feedback.
-
Require this feature to deploy When visiting |
Beta Was this translation helpful? Give feedback.
-
It would be useful to have an option to change the reference to the assets to a CDN host.
For ex.
Nuxt and Next allow that.
Nuxt
https://nuxtjs.org/docs/configuration-glossary/configuration-build/#publicpath
Next
https://nextjs.org/docs/api-reference/next.config.js/cdn-support-with-asset-prefix
Beta Was this translation helpful? Give feedback.
All reactions