Configuring any CDN to deliver only one file no matter what url has been requested

后端 未结 9 1823
日久生厌
日久生厌 2021-02-01 22:29

I am currently working on a new project where the entire page should be implemented in HTML5/JS working against an API/JSON. Since the entire application should only consist of

9条回答
  •  天涯浪人
    2021-02-01 22:33

    In case you have your own domain that point at the CDN (I know CloudFront let you do that), you could use CloudFlare ( https://www.cloudflare.com/ ) as a reverse proxy between your users and the CDN.

    Thanks to their free plan, you can create a rule that redirects everything to index.html. I think this is the only way to achieve what you want, given that CDNs are configured to serve only static existing files as you know.

提交回复
热议问题