Caddyfile is here:
limxw.com {
tls 643089849@qq.com
encode gzip
log {
output file /var/log/access.log
}
root blog
file_server
route /webhook {
webhook {
repo https://github.com/WingLim/winglim.github.io.git
branch master
path blog
secret balabala
}
}
}
And the access.log for one request send by my chrome is here:
{"level":"error","ts":1619323546.815298,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"117.147.13.197:3183","proto":"HTTP/2.0","method":"GET","host":"limxw.com","uri":"/webhook","headers":{"Sec-Ch-Ua-Mobile":["?0"],"Dnt":["1"],"Sec-Fetch-Mode":["navigate"],"Sec-Fetch-Dest":["document"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"],"Sec-Fetch-Site":["none"],"Sec-Fetch-User":["?1"],"Accept-Encoding":["gzip, deflate, br"],"Cache-Control":["max-age=0"],"Sec-Ch-Ua":["\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"90\", \"Google Chrome\";v=\"90\""],"Upgrade-Insecure-Requests":["1"],"User-Agent":["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36"],"Accept-Language":["en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"h2","proto_mutual":true,"server_name":"limxw.com"}},"common_log":"117.147.13.197 - - [25/Apr/2021:04:05:46 +0000] \"GET /webhook HTTP/2.0\" 500 0","duration":0.000076297,"size":0,"status":500,"resp_headers":{"Server":["Caddy"]}}
I test the same GET request in postman, the postman tells me SSL work.
The logs of postman request:
{"level":"error","ts":1619323754.1526093,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_addr":"117.147.13.197:3917","proto":"HTTP/1.1","method":"GET","host":"limxw.com","uri":"/webhook","headers":{"Referer":["http://limxw.com/webhook"],"User-Agent":["PostmanRuntime/7.26.10"],"Accept":["*/*"],"Postman-Token":["d5c9f640-da75-48f9-ad19-88c3213dcfc6"],"Accept-Encoding":["gzip, deflate, br"],"Connection":["keep-alive"]},"tls":{"resumed":true,"version":772,"cipher_suite":4865,"proto":"","proto_mutual":true,"server_name":"limxw.com"}},"common_log":"117.147.13.197 - - [25/Apr/2021:04:09:14 +0000] \"GET /webhook HTTP/1.1\" 500 0","duration":0.000118742,"size":0,"status":500,"resp_headers":{"Server":["Caddy"]}}
The most difference is the protocol, chrome use HTTP/2.0 and postman use HTTP/1.1, will it be the reason?