Skip to content

Commit

Permalink
fix: add token cookie to cache key (jsr-io#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato authored Feb 29, 2024
1 parent 6975e46 commit 73f4fee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion terraform/cloud_run_frontend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ resource "google_compute_backend_service" "registry_frontend" {
cdn_policy {
cache_mode = "USE_ORIGIN_HEADERS"
cache_key_policy {
include_query_string = true
include_query_string = true
include_http_headers = ["x-jsr-bypass-waitlist"]
include_named_cookies = ["token"] # segment cache by user
}
serve_while_stale = 0 # don't serve stale content
default_ttl = 0 # no caching unless specified by the backend
Expand Down

0 comments on commit 73f4fee

Please sign in to comment.