Skip to content

Conversation

jbro
Copy link
Contributor

@jbro jbro commented May 12, 2025

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!! Saved me a bunch of time :D

@mholt mholt merged commit 5e618b7 into caddyserver:master May 12, 2025
@bayardar
Copy link

bayardar commented May 13, 2025

When trying to use the health_request_body directive, the use of backticks for a json body does not work.
Ex :

  • health_request_body {"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]} --> This works
Host:               192.168.XXX.XXX:XXXX
User-Agent:         Go-http-client/1.1
Content-Length:     63
Accept-Encoding:    gzip
Content-Type:       application/json
Via:                1.1 Caddy
X-Forwarded-For:    192.168.XXX.XXX
X-Forwarded-Host:   blablabla.xyz
X-Forwarded-Proto:  http
JSON
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": []
}
  • health_request_body `{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}` --> This does not works it send an empty body
Host:               192.168.XXX.XXX:XXXX
User-Agent:         Go-http-client/1.1
Content-Length:     0
Accept-Encoding:    gzip
Content-Type:       application/json
Via:                1.1 Caddy
X-Forwarded-For:   192.168.XXX.XXX
X-Forwarded-Host:   rblablabla.xyz
X-Forwarded-Proto:  http
No request content

Might be interesting to write that in the doc or even adapt the code to take it into account properly!
This is not working as expected here https://caddyserver.com/docs/caddyfile/concepts#tokens-and-quotes in the backticks section!

@francislavoie
Copy link
Member

francislavoie commented May 13, 2025

What do you mean by "it doesn't work"? Show the error. Show evidence.

If there's a problem, report the bug.

@jbro jbro deleted the update-reverseproxy-docs branch May 13, 2025 10:10
@bayardar
Copy link

Sure, edited my comment and created an issue! See caddyserver/caddy#7021.

ps : no need to be rude, I'm just trying to help :)

@mholt
Copy link
Member

mholt commented May 13, 2025

FWIW I don't feel like Francis was being rude. He was requiring more information, since we can't help without it.

Also, I do think a closed docs PR in the website repo might be the wrong place to report a bug. I'd follow Francis' advice and open an issue in caddyserver/caddy instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants