Advice: Handle error 403 for all hosts based on header

Hi,

1. The problem I’m having:

Determine the simplest way to set globally, so its valid for all hosts or else use import per host?

        @blocked {
                header_regexp User-Agent Amazonbot*
        }
        handle @blocked {
                error 403
        }

3. Caddy version:

2.8.4

There’s no way to configure global HTTP routes. Using snippets + import is the recommended way to reduce config duplication.

Please completely fill out the help topic template, as per the forum rules.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.