Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support usage in cloudflare workers #27
feat: support usage in cloudflare workers #27
Changes from all commits
9323dd2
701c54b
758c5eb
bacece6
01a345f
1b138d6
7492c93
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd split this
if
into two as they handle 2 distinct use cases. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only want to preform this
omit
check in the case that thecredentials
are accessibleWe do still want to deal with cookies though if credentials aren't.
we could do this instead - but i'm not sure the extra nesting gives us much? but I don't have strong feelings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kettanaito that check is diifferent than the one implemented here.
We do want to allow interacting with cookies when credentials are not implemented. We only want to check for omit when they are implemented.
the logic here is
In your change we would return early if credentials are not implemented OR if they are omit. Which would fail to modify cookies in the case credentials are not implemented, which is not what we want in this case (as far as I can tell from a quick skimming of the docs on cloudflare - it is fine to interact with cookies there, there's just not credential check)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see now. Apologies, took me a minute to wrap my head around this. Please, feel free to proceed with your latest suggestion, it looks great then.