Reverse Proxy Storj GatewayST

1. The problem I’m having:

I’m new to caddy. I’m trying reverse proxy GatewayST (They forked MinIO as far as I can remember, I’m not sure) which is running on port 7777.
The problem is I’m getting following error if I open an object url.

2. Error messages and/or full log output:

400 Bad Request: malformed Host header.

3. Caddy version:

v2.6.4 h1:2hwYqiRwk1tf3VruhMpLcYTg+11fCdr8S3jhNAdnPy8=

a. System environment:

OS : Ubuntu 22.04
Using : Systemd

b. Command:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

c. Service/unit/compose file:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

d. My complete Caddy config:

cdn.nixorigin.one {
  reverse_proxy /nixone/* 127.0.0.1:7777 {
    header_up X-Real-IP {remote}
    header_up X-Forwarded-For {remote}
    header_up X-Forwarded-Proto {scheme}
    header_up Host {http.host}
  }
}

5. Links to relevant resources:

The issue has been resolved after removing

header_up Host {http.host}

Remove all of these. Caddy sets these headers automatically to the appropriate values. See reverse_proxy (Caddyfile directive) — Caddy Documentation

1 Like

Thanks for the heads up !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.