mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-15 03:15:01 -05:00
Allow revealing server field with ?server
This commit is contained in:
parent
a920914b4c
commit
a890665775
1 changed files with 5 additions and 1 deletions
|
@ -220,7 +220,11 @@ export default class App extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
let queryParams = parseQueryString();
|
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;
|
connectParams.url = queryParams.server;
|
||||||
|
|
||||||
// When using a custom server, some configuration options don't
|
// When using a custom server, some configuration options don't
|
||||||
|
|
Loading…
Reference in a new issue