![]() Expects a comma-delimited string (ex: ‘Content-Type,Authorization’) or an array (ex: ). allowedHeaders: Configures the Access-Control-Allow-Headers CORS header.Expects a comma-delimited string (ex: ‘GET,PUT,POST’) or an array (ex: ). methods: Configures the Access-Control-Allow-Methods CORS header. ![]() The function takes the request origin as the first parameter and a callback (called as callback(err, origin), where origin is a non-function value of the origin option) as the second. Function - set origin to a function implementing some custom logic.For example will accept any request from “” or from a subdomain of “”. Array - set origin to an array of valid origins.For example the pattern /example\.com$/ will reflect any request that is coming from an origin ending with “”. If it’s a match, the request origin will be reflected. RegExp - set origin to a regular expression pattern which will be used to test the request origin. ![]() For example if you set it to "" only requests from “” will be allowed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |