How does masterKeyIps allow all ip access

parse-dashboard version:5.0.0
parse-server version 6.0.0

dashboard access parse-server I get this error: “error: Request using master key rejected as the request IP address ‘::ffff:xxx.x.xxx.xxx’ is not set in Parse Server option ‘masterKeyIps’.”

parse-server app.js

const server = new ParseServer({
  databaseURI: 'mongodb://serverip:27017/testdb', // Connection string for your MongoDB database
  cloud: process.env.PARSE_SERVER_CLOUD || __dirname + '/cloud/main.js', // Path to your Cloud Code
  appId: 'myAppId',
  masterKey: 'myMasterKey', // Keep this key secret!
  javascriptKey: 'myJavascriptKey',
  serverURL: 'http://serverip:1337/parse', // Don't forget to change to https if needed
  masterKeyIps: [],
  liveQuery: {
    classNames: ["Post", "Comment"], // List of classes to support for query subscriptions
  },
  useMasterKey: true,
  allowClientClassCreation: false,
  allowExpiredAuthDataToken: false
});

parse-dashboard app.js

var dashboard = new ParseDashboard({
	apps: [
		{
			serverURL: "http://serverip:1337/parse",
			appId: "myAppId",
			masterKey: "myMasterKey",
			graphQLServerURL: "http://serverip:1337/graphql",
			appName: "MyApp",
		},
	],
	users: [
		{
			user: "admin",
			pass: "123456"
		}
	]
}, options);

masterKeyIps Array.<String> Restrict masterKey to be used by only these ips, defaults to (allow all ips) but it’s invalid

How should I set masterKeyIps

2 Likes

I find The option "masterKeyIps" cannot be disabled ¡ Issue #8421 ¡ parse-community/parse-server ¡ GitHub I solved this problem

2 Likes