feat: allow custom cors origin header (#6772)
This commit is contained in:
@@ -28,6 +28,10 @@ module.exports.ParseServerOptions = {
|
||||
help: 'Add headers to Access-Control-Allow-Headers',
|
||||
action: parsers.arrayParser,
|
||||
},
|
||||
allowOrigin: {
|
||||
env: 'PARSE_SERVER_ALLOW_ORIGIN',
|
||||
help: 'Sets the origin to Access-Control-Allow-Origin',
|
||||
},
|
||||
analyticsAdapter: {
|
||||
env: 'PARSE_SERVER_ANALYTICS_ADAPTER',
|
||||
help: 'Adapter module for the analytics',
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* @property {Boolean} allowClientClassCreation Enable (or disable) client class creation, defaults to true
|
||||
* @property {Boolean} allowCustomObjectId Enable (or disable) custom objectId
|
||||
* @property {String[]} allowHeaders Add headers to Access-Control-Allow-Headers
|
||||
* @property {String} allowOrigin Sets the origin to Access-Control-Allow-Origin
|
||||
* @property {Adapter<AnalyticsAdapter>} analyticsAdapter Adapter module for the analytics
|
||||
* @property {String} appId Your Parse Application ID
|
||||
* @property {String} appName Sets the app name
|
||||
|
||||
@@ -29,6 +29,8 @@ export interface ParseServerOptions {
|
||||
appName: ?string;
|
||||
/* Add headers to Access-Control-Allow-Headers */
|
||||
allowHeaders: ?(string[]);
|
||||
/* Sets the origin to Access-Control-Allow-Origin */
|
||||
allowOrigin: ?string;
|
||||
/* Adapter module for the analytics */
|
||||
analyticsAdapter: ?Adapter<AnalyticsAdapter>;
|
||||
/* Adapter module for the files sub-system */
|
||||
|
||||
Reference in New Issue
Block a user