Skip to content

Commit 5aa80f7

Browse files
committed
fix: reverse option
1 parent 74c4bda commit 5aa80f7

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/Options/Definitions.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -593,13 +593,6 @@ module.exports.ParseServerOptions = {
593593
help: 'Disables console output',
594594
action: parsers.booleanParser,
595595
},
596-
skipVerifyServerUrl: {
597-
env: 'PARSE_SERVER_SKIP_VERIFY_SERVER_URL',
598-
help:
599-
'Set to `true` to skip the server URL verification on startup. This can be useful in environments where the server URL is not accessible from the server itself, such as when running behind a firewall, in certain containerized environments, or in test environments like Jest where the verification may cause issues or unnecessary delays during test execution.<br><br>Default is `false`.',
600-
action: parsers.booleanParser,
601-
default: false,
602-
},
603596
startLiveQueryServer: {
604597
env: 'PARSE_SERVER_START_LIVE_QUERY_SERVER',
605598
help: 'Starts the liveQuery server',
@@ -623,6 +616,13 @@ module.exports.ParseServerOptions = {
623616
help: 'Set the logging to verbose',
624617
action: parsers.booleanParser,
625618
},
619+
verifyServerUrl: {
620+
env: 'PARSE_SERVER_VERIFY_SERVER_URL',
621+
help:
622+
'Set to `false` to skip the server URL verification on startup. This can be useful in environments where the server URL is not accessible from the server itself, such as when running behind a firewall, in certain containerized environments, or in test environments like Jest where the verification may cause issues or unnecessary delays during test execution.<br><br>Default is `true`.',
623+
action: parsers.booleanParser,
624+
default: true,
625+
},
626626
verifyUserEmails: {
627627
env: 'PARSE_SERVER_VERIFY_USER_EMAILS',
628628
help:

src/Options/docs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Options/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ export interface ParseServerOptions {
5757
/* URL to your parse server with http:// or https://.
5858
:ENV: PARSE_SERVER_URL */
5959
serverURL: string;
60-
/* Set to `true` to skip the server URL verification on startup. This can be useful in environments where the server URL is not accessible from the server itself, such as when running behind a firewall, in certain containerized environments, or in test environments like Jest where the verification may cause issues or unnecessary delays during test execution.
60+
/* Set to `false` to skip the server URL verification on startup. This can be useful in environments where the server URL is not accessible from the server itself, such as when running behind a firewall, in certain containerized environments, or in test environments like Jest where the verification may cause issues or unnecessary delays during test execution.
6161
<br><br>
62-
Default is `false`.
63-
:DEFAULT: false */
64-
skipVerifyServerUrl: ?boolean;
62+
Default is `true`.
63+
:DEFAULT: true */
64+
verifyServerUrl: ?boolean;
6565
/* (Optional) Restricts the use of master key permissions to a list of IP addresses or ranges.<br><br>This option accepts a list of single IP addresses, for example `['10.0.0.1', '10.0.0.2']`. You can also use CIDR notation to specify an IP address range, for example `['10.0.1.0/24']`.<br><br><b>Special scenarios:</b><br>- Setting an empty array `[]` means that the master key cannot be used even in Parse Server Cloud Code. This value cannot be set via an environment variable as there is no way to pass an empty array to Parse Server via an environment variable.<br>- Setting `['0.0.0.0/0', '::0']` means to allow any IPv4 and IPv6 address to use the master key and effectively disables the IP filter.<br><br><b>Considerations:</b><br>- IPv4 and IPv6 addresses are not compared against each other. Each IP version (IPv4 and IPv6) needs to be considered separately. For example, `['0.0.0.0/0']` allows any IPv4 address and blocks every IPv6 address. Conversely, `['::0']` allows any IPv6 address and blocks every IPv4 address.<br>- Keep in mind that the IP version in use depends on the network stack of the environment in which Parse Server runs. A local environment may use a different IP version than a remote environment. For example, it's possible that locally the value `['0.0.0.0/0']` allows the request IP because the environment is using IPv4, but when Parse Server is deployed remotely the request IP is blocked because the remote environment is using IPv6.<br>- When setting the option via an environment variable the notation is a comma-separated string, for example `"0.0.0.0/0,::0"`.<br>- IPv6 zone indices (`%` suffix) are not supported, for example `fe80::1%eth0`, `fe80::1%1` or `::1%lo`.<br><br>Defaults to `['127.0.0.1', '::1']` which means that only `localhost`, the server instance on which Parse Server runs, is allowed to use the master key.
6666
:DEFAULT: ["127.0.0.1","::1"] */
6767
masterKeyIps: ?(string[]);

src/ParseServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ class ParseServer {
487487
/* istanbul ignore next */
488488
if (!process.env.TESTING) {
489489
configureListeners(this);
490-
if(!options.skipVerifyServerUrl) {
490+
if (options.verifyServerUrl !== false) {
491491
await ParseServer.verifyServerUrl();
492492
}
493493
}

types/Options/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export interface ParseServerOptions {
122122
allowExpiredAuthDataToken?: boolean;
123123
requestKeywordDenylist?: (RequestKeywordDenylist[]);
124124
rateLimit?: (RateLimitOptions[]);
125-
skipVerifyServerUrl?: boolean;
125+
verifyServerUrl?: boolean;
126126
}
127127
export interface RateLimitOptions {
128128
requestPath: string;

0 commit comments

Comments
 (0)