EDIT: Read this github issue and it seemed very similar. My flask logs are showing POST requests as GET requests, so I guess caddy is rewriting them?
1. The problem I’m having:
I have a python flask webserver setup, with a route to accept POST requests:
2. Error messages and/or full log output:
<!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
3. Caddy version:
v2.6.4 h1:2hwYqiRwk1tf3VruhMpLcYTg+11fCdr8S3jhNAdnPy8=
4. How I installed and ran Caddy:
Installed via the deb repo.
a. System environment:
Ubuntu jammy
b. Command:
Running via systemd.
d. My complete Caddy config:
threat.uno {
reverse_proxy :6081
log {
output file "/var/log/caddy/access.log"
}
header -Server
header Server "AGL"
header -x-varnish
header -X-Cdn-Serve
}