fasthtml icon indicating copy to clipboard operation
fasthtml copied to clipboard

[BUG] "WebSocket /live-reload" 403

Open eibednejo opened this issue 5 months ago • 1 comments

Describe the bug I ran an app (port 5001) with this live=True inside this line of code, and it worked fine, the terminal was fine too.

app, rt = fast_app(live=True, debug=True, pico=False, hdrs=(frankenui, tailwind), before=bware)

Then I shut down the app (ctrl + c). After that, I tried to run another different app (port 5001) that doesn't have live=True

app, rt = fast_app(hdrs=base_hdrs + custom_styles)

I got this in my terminal, but the app works fine tho

INFO:     127.0.0.1:49494 - "WebSocket /live-reload" 403
INFO:     connection rejected (403 Forbidden)
INFO:     connection closed
INFO:     127.0.0.1:49496 - "WebSocket /live-reload" 403
INFO:     connection rejected (403 Forbidden)
INFO:     connection closed
INFO:     127.0.0.1:49498 - "WebSocket /live-reload" 403
INFO:     connection rejected (403 Forbidden)
INFO:     connection closed

If I run this using port 5002, no issue.

If I add live=True using port 5001, WebSocket got accepted.

app, rt = fast_app(live=True, hdrs=base_hdrs + custom_styles)
Image

Is there any way to stop this repeating message without having to use live=True?

Environment Information Please provide the following version information:

  • fastlite version: 0.2.0
  • fastcore version: 1.8.4
  • fasthtml version: 0.12.20

Confirmation Please confirm the following:

  • [x] I have read the FAQ (https://docs.fastht.ml/explains/faq.html)
  • [x] I have provided a minimal reproducible example
  • [x] I have included the versions of fastlite, fastcore, and fasthtml
  • [x] I understand that this is a volunteer open source project with no commercial support.

Screenshots

Image

eibednejo avatar Jun 24 '25 13:06 eibednejo