Skip to content
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

Support caching on AWS CloudFront #200

Merged
merged 3 commits into from
Jan 18, 2024
Merged

Support caching on AWS CloudFront #200

merged 3 commits into from
Jan 18, 2024

Conversation

Siegrift
Copy link
Collaborator

@Siegrift Siegrift commented Jan 17, 2024

Closes #193

AWS CloudFront does not support caching based on custom header nor does recognize cdn-cache-control. The original issue mentioned making the cache headers more generic, but I don't think it's necessary. We can use both the standard cache-control for browser-cache (which is recognized by CloudFront) and the cdn-cache-control.

The PR also removes these headers from POST response (which does not make sense).

@Siegrift Siegrift requested a review from andreogle January 17, 2024 21:55
@Siegrift Siegrift self-assigned this Jan 17, 2024
@Siegrift Siegrift requested a review from bdrhn9 January 17, 2024 21:55
@Siegrift
Copy link
Collaborator Author

@bdrhn9 LMK if you see some issues with this, but I think it's OK.

Copy link
Contributor

@bdrhn9 bdrhn9 left a comment

Choose a reason for hiding this comment

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

LGTM.

Nit: Probably you are meaning CloudFront, so we can update issue title and description :)

packages/signed-api/src/handlers.ts Show resolved Hide resolved
Base automatically changed from allow-secrets to main January 18, 2024 15:59
@Siegrift
Copy link
Collaborator Author

Nit: Probably you are meaning CloudFront, so we can update issue title and description :)

Yeah, thanks :) Too many cloudXyz at this point for my brain.

@Siegrift Siegrift changed the title Support caching on AWS CloudFlare Support caching on AWS CloudFront Jan 18, 2024
@Siegrift Siegrift merged commit 0e93ebf into main Jan 18, 2024
4 checks passed
@Siegrift Siegrift deleted the cache-headers branch January 18, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make cache settings more generic
3 participants