Add live proxy feature by ndealmeida · Pull Request #512 · air-verse/air
When using htmx to perform an update with partials the proxy fails due to the lack of body tag in the response.
Clicking this button:
<button hx-get="/user/more" hx-target="#data"> Load fresh data </button> <div id="data"></div>
Calls an endpoint which returns this partial:
package user templ More() { <p>Injected partial</p> }
Which causes this error:
{"time":"2024-01-26T17:58:57.853555007-08:00","id":"","remote_ip":"[::1]:41856","host":"localhost:3000","method":"GET","uri":"/user/more","user_agent":"Go-http-client/1.1","status":200,"error":"","latency":5751,"latency_human":"5.751µs","bytes_in":0,"bytes_out":0}
2024/01/26 17:58:57 invalid html page, missing the body tag