air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
18.32k stars 815 forks source link

Returning HTML breaks proxy #615

Closed mattbrandman closed 5 months ago

mattbrandman commented 5 months ago

It appears that when returning HTML from an endpoint the proxy seems to intercept and not return the traffic to the site. You can reproduce by making a simple endpoint that returns <div></div> and see that it is not in the payload. Returning plaintext or json does not suffer from this issue. Noticed this issue as I'm working with HTMX responses and they do not seem to work from the proxy but work from the non-proxy port.

michaelgaultjr commented 5 months ago

I'm also experiencing this issue. Would be nice to get a fix for this soon, really would be nice to have hot reloading while working with Go And HTML.

EDIT: It looks like there is some PR's attempting to fix the issue being worked on

611

604

diego-velez commented 5 months ago

+1

ndajr commented 5 months ago

This should be fixed, please download the new air version. Make sure you have a <body></body> tag in your html page

mattbrandman commented 5 months ago

Can confirm this is fixed in 1.52.3! Thank you incredible experience using this now!