Skip to content

How to rewrite paths with AWS CloudFront #1819

Answered by kermanx
peacock0803sz asked this question in Q&A
Discussion options

You must be logged in to vote

It seems that the urls like /pyconapac2023/assets/* should be preserved. Maybe it should be

    if ((paths.length <= 2 && paths[1] !== "index.html") || (paths.length >= 3 && paths[2] !== "assets")) {
        request.uri = `/${paths[1]}/index.html`;
    }

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@peacock0803sz
Comment options

@kermanx
Comment options

kermanx Aug 15, 2024
Collaborator

Answer selected by peacock0803sz
@peacock0803sz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants