Skip to content

xcaddyplugins/caddy-trusted-gcp-cloudcdn

Repository files navigation

Build Status Licenses donate

trusted_proxies GCP Cloud CDN module for Caddy

The module auto trusted_proxies GCP CloudCDN EDGE servers from _cloud-eoips.googleusercontent.com TXT record

Doc: https://cloud.google.com/cdn/docs/set-up-external-backend-internet-neg

Install

The simplest, cross-platform way to get started is to download Caddy from GitHub Releases and place the executable file in your PATH.

Build from source

Requirements:

Build:

$ xcaddy build --with github.com/xcaddyplugins/caddy-trusted-gcp-cloudcdn

Caddyfile Syntax

trusted_proxies gcp_cloudcdn {
	interval <duration>
}
  • interval How often to fetch the latest IP list. format is caddy.Duration. For example 12h represents 12 hours, and "1d" represents one day. default value 1d.

Caddyfile Example

trusted_proxies gcp_cloudcdn {
	interval 1d
}

Caddyfile Use Default Settings Example

trusted_proxies gcp_cloudcdn

Caddyfile Global Trusted Example

Insert the following configuration of Caddyfile to apply it globally.

{
	servers {
		trusted_proxies gcp_cloudcdn
	}
}