1. My Caddy version (caddy version
):
FROM caddy/caddy:alpine
2. How I run Caddy:
docker-compose up
a. System environment:
FROM caddy/caddy:alpine
b. Command:
paste command here
c. Service/unit/compose file:
paste full file contents here
d. My complete Caddyfile or JSON config:
{
email mail@gmail.com
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
translatum.xyz {
respond "let the neurons flow - translatum.xyz!"
}
# perception studies
perception.translatum.xyz {
reverse_proxy {
to perceptionist:8888
}
}
glio.translatum.xyz {
reverse_proxy {
to bratsstarz:80
}
}
pneumonia.translatum.xyz {
reverse_proxy {
to pneustarz:80
}
}
# kraken
corona.translatum.xyz {
reverse_proxy {
to coronakraken:80
}
}
kraken.translatum.xyz {
respond "high 8 - long live the kraken on translatum.xyz!"
}
corona.kraken.translatum.xyz {
reverse_proxy {
to http://dockerhost:8080
}
}
redis.kraken.translatum.xyz {
reverse_proxy {
to http://dockerhost:6379
}
}
python.kraken.translatum.xyz {
reverse_proxy {
to http://dockerhost:8889
}
}
upload.kraken.translatum.xyz {
reverse_proxy {
to http://dockerhost:3020
}
}
3. The problem I’m having:
I am trying to setup an upload via an ssh-tunnel aka. dockerhost in my caddy file. the ssh-tunnel works but I am running into CORS issues (see error msgs).
4. Error messages and/or full log output:
browser console
Access to XMLHttpRequest at 'http://upload.kraken.translatum.xyz/corona-upload/96f4148e73058a9367cc2fb518482834' from origin 'http://127.0.0.1:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
caddy
percy | {"level":"error","ts":1585937612.8092902,"logger":"http.log.error","msg":"read tcp 172.25.0.2:48266->172.25.0.1:3020: read: connection reset by peer","request":{"method":"HEAD","uri":"/admin/files/admin/css/custom.css","proto":"HTTP/1.1","remote_addr":"23.254.229.202:41280","host":"upload.kraken.translatum.xyz","headers":{"Accept-Encoding":["gzip, deflate"],"Accept":["*/*"],"Connection":["keep-alive"],"User-Agent":["python-requests/2.18.4"]},"tls":{"resumed":false,"version":772,"ciphersuite":4865,"proto":"","proto_mutual":true,"server_name":"upload.kraken.translatum.xyz"}},"status":502,"err_id":"vh29rf74u","err_trace":"reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:363)"}
percy | {"level":"error","ts":1585937612.906564,"logger":"http.log.error","msg":"read tcp 172.25.0.2:48272->172.25.0.1:3020: read: connection reset by peer","request":{"method":"HEAD","uri":"/app/lib/pics/glaesses_not.svg","proto":"HTTP/1.1","remote_addr":"23.254.229.202:41282","host":"upload.kraken.translatum.xyz","headers":{"User-Agent":["python-requests/2.18.4"],"Accept-Encoding":["gzip, deflate"],"Accept":["*/*"],"Connection":["keep-alive"]},"tls":{"resumed":false,"version":772,"ciphersuite":4865,"proto":"","proto_mutual":true,"server_name":"upload.kraken.translatum.xyz"}},"status":502,"err_id":"f3pc17n0i","err_trace":"reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:363)"}
percy | {"level":"error","ts":1585937613.0103903,"logger":"http.log.error","msg":"read tcp 172.25.0.2:48278->172.25.0.1:3020: read: connection reset by peer","request":{"method":"HEAD","uri":"/office365/logs.txt","proto":"HTTP/1.1","remote_addr":"23.254.229.202:41284","host":"upload.kraken.translatum.xyz","headers":{"Accept-Encoding":["gzip, deflate"],"Accept":["*/*"],"Connection":["keep-alive"],"User-Agent":["python-requests/2.18.4"]},"tls":{"resumed":false,"version":772,"ciphersuite":4865,"proto":"","proto_mutual":true,"server_name":"upload.kraken.translatum.xyz"}},"status":502,"err_id":"s7y65ejbu","err_trace":"reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:363)"}
percy | {"level":"error","ts":1585937613.1078727,"logger":"http.log.error","msg":"read tcp 172.25.0.2:48296->172.25.0.1:3020: read: connection reset by peer","request":{"method":"HEAD","uri":"/bocah/","proto":"HTTP/1.1","remote_addr":"23.254.229.202:41286","host":"upload.kraken.translatum.xyz","headers":{"User-Agent":["python-requests/2.18.4"],"Accept-Encoding":["gzip, deflate"],"Accept":["*/*"],"Connection":["keep-alive"]},"tls":{"resumed":false,"version":772,"ciphersuite":4865,"proto":"","proto_mutual":true,"server_name":"upload.kraken.translatum.xyz"}},"status":502,"err_id":"k0r8zdp22","err_trace":"reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:363)"}
percy | {"level":"error","ts":1585937613.213589,"logger":"http.log.error","msg":"read tcp 172.25.0.2:48306->172.25.0.1:3020: read: connection reset by peer","request":{"method":"HEAD","uri":"/admin/","proto":"HTTP/1.1","remote_addr":"23.254.229.202:41288","host":"upload.kraken.translatum.xyz","headers":{"User-Agent":["python-requests/2.18.4"],"Accept-Encoding":["gzip, deflate"],"Accept":["*/*"],"Connection":["keep-alive"]},"tls":{"resumed":false,"version":772,"ciphersuite":4865,"proto":"","proto_mutual":true,"server_name":"upload.kraken.translatum.xyz"}},"status":502,"err_id":"h4jsysbh1","err_trace":"reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:363)"}
5. What I already tried:
At perception.translatum.xyz I run another upload server which works fine. If I copy the same server to the tunnel machine it does not work anymore because of CORS.
the front-end located at corona.translatum.xyz which runs on the front-end server is not able to upload to upload.kraken.translatum.xyz. I switched from an node-express xhr upload server to tusd for TUS uploads but it still does not work. Also when I use the identical front-end located on corona.kraken.translatum.xyz which runs on the backend server for testing purposes it won’t connect to the upload server.
6. Links to relevant resources:
Unfortunately outdated.