LaserWeb / LaserWeb4

Collaborative effort on the next version of LaserWeb / CNCWeb
GNU Affero General Public License v3.0
712 stars 192 forks source link

(2/2) Guess backend server #667

Closed lightbirne closed 5 months ago

lightbirne commented 10 months ago

PR #666 should be applied before this one, but there is no hard dependency between them.

This modifies LaserWeb's default configuration for accessing the backend server. Instead of using localhost:8000, it uses the hostname of the web server that served the frontend.

The change enables LaserWeb to automatically find the correct address when it is bundled with lw.comm-server. But users can still choose to use a different server if they prefer. It should work with any browser. However, if auto-detection is not available, the software will fall back to the previous defaults.