1. The problem I’m having:
Essentially I’ve been using this template: GitHub - TomDoesTech/caddy-nodejs-docker-tutorial in an attempt to to try deploy a golang application with automatic tls. It all works fine for the most part and I can call GET endpoints on my app through the https url however when I try and call a POST endpoint the golang application sees that it insteads gets a GET request instead. This is not the case when testing on localhost. I’m new to caddy and this kind of technology so I’m assuming I’ve done something wrong on my end.
2. Error messages and/or full log output:
3. Caddy version:
v2.6.4 h1:2hwYqiRwk1tf3VruhMpLcYTg+11fCdr8S3jhNAdnPy8=
4. How I installed and ran Caddy:
Inside a docker compose file
caddy:
image: caddy/caddy:2.6.4-alpine
container_name: caddy-service
restart: unless-stopped
ports:
- “80:80”
- “443:443”
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
a. System environment:
Docker
b. Command:
c. Service/unit/compose file:
version: '3.7'
services:
server:
container_name: server
restart: unless-stopped
build:
context: ./
# Run the caddy server
caddy:
image: caddy/caddy:2.6.4-alpine
container_name: caddy-service
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config:
d. My complete Caddy config:
api.Idontknowman.xyz {
reverse_proxy server:4000
}