Reverse proxy serving API - Invalid HTTP request

1. The problem I’m having:

I m trying to serve an API over HTTPS with reverse proxy Caddy
Seems that Https is ok since I can access api on the web but on api side “Invalid HTTP request” is showing.
Uvicorn is running the api that is build with Python and FastApi.
Uviron is speaking in http1
how to send correct http query from reverse proxy to api so it is read and processed by the api?

2. Error messages and/or full log output:

Invalid HTTP request on API side

3. Caddy version:


4. How I installed and ran Caddy:

Installed using Brew

a. System environment:


b. Command:

caddy reverse-proxy --from --to :myport

c. Service/unit/compose file:

d. My complete Caddy config:

5. Links to relevant resources:

Please completely fill out the help topic template, as per the forum rules. You left many sections empty and you didn’t provide enough context so I don’t know how to help.

Please show example requests that show your problem. Show your logs. Please don’t redact your commands and logs, it only makes it harder for us to help.

Thanks for reply I found solutions yersteday. I was trying to force Caddy using a different port than 443. + I used Caddyfile, now it s working find but another problem occurs and I m opening a new thread for this.

1 Like

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