Commit graph

2 commits

Author SHA1 Message Date
Stefano Pigozzi
1413052d82
Configure webpack to allow proxied GitHub Codespaces connections
By default, webpack's development websocket rejects all incoming connections having an unexpected `Host` or `Origin` header:
https://webpack.js.org/configuration/dev-server/#devserverallowedhosts

This configuration sets `devServer.allowedHosts` to `[".preview.app.github.dev"]` if a GitHub Codespaces environment is detected.

Additionally, to handle how GitHub Codespaces forwards ports, webpack's configuration is changed to obtain the full websocket URL from the client script, instead of only the hostname:
https://webpack.js.org/configuration/dev-server/#websocketurl
2022-11-19 01:05:20 +00:00
unknown
026f835a87 initial commit 2021-07-28 18:45:52 +05:30