Skip to content

Make root level <tld>.tls = internal to override nested ones #735

@alber70g

Description

@alber70g

Here's a caddyfile with an example

$ cat Caddyfile.autosave
{
	acme_dns cloudflare <token>
	debug
	email <email>
}
*.intranet {
	tls internal
}
change.public-domain.com, change.intranet, http://changedetection.intranet {
	reverse_proxy 172.18.0.8:5000
}
speed.intranet {
	reverse_proxy 172.18.0.5:80
}

Note:

  • *.local.co is set to tls internal
  • change.public-domain.com is proxied as per ususal, and accessible

Request

Because the *.intranet { } global section has tls internal, all subsequent ones need to have that as well. So actually they need to be decomposed into two separate sections:

{
	acme_dns cloudflare <token>
	debug
	email <email>
}
*.intranet {
	tls internal
}
change.public-domain.com, http://changedetection.intranet {
	reverse_proxy 172.18.0.8:5000
}
# decomposition
change.intranet {
    tls internal
	reverse_proxy 172.18.0.8:5000
}
# adds `tls internal` because of global wildcard one
speed.intranet {
	reverse_proxy 172.18.0.5:80
    tls internal
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions