Allow revealing server field with ?server

This commit is contained in:
Simon Ser 2021-10-09 13:33:01 +02:00
parent a920914b4c
commit a890665775

View file

@ -220,7 +220,11 @@ export default class App extends Component {
}
let queryParams = parseQueryString();
if (typeof queryParams.server === "string" && !connectParams.url) {
// Don't allow to silently override the server URL if there's one in
// config.json, because this has security implications. But still allow
// setting server to an empty string to reveal the server field in the
// connect form.
if (typeof queryParams.server === "string" && (!connectParams.url || !queryParams.server)) {
connectParams.url = queryParams.server;
// When using a custom server, some configuration options don't