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

CDN policy for web backend: cache_mode = "USE_ORIGIN_HEADERS" #11

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions load_balancer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@ resource "google_compute_backend_service" "web" {
name = "serverpod-${var.runmode}-backend-web"
protocol = "HTTP"
enable_cdn = true
cdn_policy {
cache_mode = "USE_ORIGIN_HEADERS"
cache_key_policy {
include_host = true
include_protocol = true
include_query_string = true
include_http_headers = ["Cache-Control"]
}
}

backend {
group = google_compute_instance_group_manager.serverpod.instance_group
Expand Down