air-verse / air

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

Returning HTML breaks proxy #615

Closed mattbrandman closed 4 days ago

mattbrandman commented 3 weeks 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 2 weeks 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 1 week ago

+1

ndajr commented 4 days 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 4 days ago

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