Static exports with dynamic routes for CDNs with redirect/rewrite capabilities #23942
colinclerk
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature request
My CDN has redirect/rewrite capabilities at the edge. I would like to leverage those capabilities to enable next.js static export for use with fully dynamic routes (no getStaticPaths).
Is your feature request related to a problem? Please describe.
I don't believe there's a problem. I'm running a server right now, but since I don't do any SSR I'd rather turn off the server and serve static files.
Describe the solution you'd like
Ideally, when I run
next export
it would output what rewrite mappings I should configure with my CDN provider. This should be machine readable so I could automatically update my CDN on deploy.Describe alternatives you've considered
I'm running a server right now, which certainly works. I've found a few threads indicating this might be possible already, but I wasn't able find a conclusive path forward. It looks like some of what may have been possible in the past may no longer be possible - as far as I've found there's no officially supported approach.
Here's one such thread: #2542
Beta Was this translation helpful? Give feedback.
All reactions