-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
anonymous blocks are not supported when importing site-level snippet with block #7083
Copy link
Copy link
Closed
Labels
bug 🐞Something isn't workingSomething isn't workinghelp wanted 🆘Extra attention is neededExtra attention is needed
Description
For following Caddyfile:
(site) {
http://{args[0]} https://{args[0]} {
{block}
}
}
import site test.domain {
reverse_proxy http://192.168.1.1:8080 {
header_up Host {host}
header_up X-Real-IP {remote_host}
}
}caddy run -c Caddyfile yields
Error: adapting config using caddyfile: anonymous blocks are not supported, at Caddyfile:12
Following Caddyfile will work:
(site) {
http://{args[0]} https://{args[0]} {
{block}
}
}
import site test.domain {
reverse_proxy http://192.168.1.1:8080
}Both of followings won't work:
(site) {
http://{args[0]} https://{args[0]} {
{block}
}
}
import site test.domain {
reverse_proxy http://192.168.1.1:8080 {
header_up Host {host}
header_up X-Real-IP {remote_host}
}
reverse_proxy http://192.168.1.1:8080
}(site) {
http://{args[0]} https://{args[0]} {
{block}
}
}
import site test.domain {
reverse_proxy http://192.168.1.1:8080 {
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🐞Something isn't workingSomething isn't workinghelp wanted 🆘Extra attention is neededExtra attention is needed