Skip to content
This repository was archived by the owner on Feb 9, 2024. It is now read-only.

Conversation

@JackPriceBurns
Copy link
Contributor

When using mapRequestToAsset, it encodes the URL / key and will never check the KV store for the decoded key.

This adds the ability to set pathIsEncoded to true, which will decode the URL before getting it from the KV.

Copy link
Contributor

@Cherry Cherry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

My understanding of this issue is that this line should take care of that, and then forecfully override pathIsEncoded to true, even without your changes. Is there an example you can share where this isn't the case, and manually setting pathIsEncoded to true is required?

@JackPriceBurns
Copy link
Contributor Author

@Cherry if mapRequestToAsset is set, that if branch never gets executed

@Cherry
Copy link
Contributor

Cherry commented Sep 26, 2021

@Cherry if mapRequestToAsset is set, that if branch never gets executed

Thanks, that makes total sense. I'll merge and see if we can get a new version published next week. Thanks again for the contribution!

@Cherry Cherry merged commit f9bb072 into cloudflare:master Sep 26, 2021
@Cherry Cherry mentioned this pull request Nov 9, 2021
@nataliescottdavidson nataliescottdavidson mentioned this pull request Nov 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants