caddy -version)?last official from web, source, 0.11.2, 0.11.0 0.10.4...
using caddy-geoip
:2015 {
tls off
root /srv/html
log stdout
geoip GeoLite2-City.mmdb # or Country .. whatever
header / {
Country-Code {geoip_country_code}
IP {remote}
}
./caddy -conf Caddyfile
> GET / HTTP/1.1
> Host: xxx.xxx.xxx.xxx:2015
> User-Agent: curl/7.63.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< Country-Code:
< Ip: xxx.xxx.xxx.xxx
< Server: Caddy
< X-Content-Type-Options: nosniff
< Date: Thu, 24 Jan 2019 12:47:25 GMT
< Content-Length: 14
<
404 Not Found
Non empty Country-Code
I can confirm such behavior.
This appears to be a bug report for a third-party plugin, not Caddy itself; please report the issue with the plugin repository.
ok thanks. I'll rather go back to nginx...
@scippio I checked and all work's fine. I don't understand your Caddyfile try it make simple, like this:
YOU_DOMAIN.COM {
geoip /Downloads/GeoLite2-City.mmdb
proxy / localhost:3000 {
header_upstream Country-Code {geoip_country_code}
}
}
Ok thanks. I'll rather go back to nginx...
That's totally fine, just keep in mind that the Caddy project is not responsible for 3rd party plugins.
Ok thanks. I'll rather go back to nginx...
That's totally fine, just keep in mind that the Caddy project is not responsible for 3rd party plugins.
obviously
Most helpful comment
This appears to be a bug report for a third-party plugin, not Caddy itself; please report the issue with the plugin repository.