CopyPastor

Detecting plagiarism made easy.

Score: 2; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2023-01-07
by Lee Hannigan

Original Post

Original - Posted on 2017-07-03
by sqren



            
Present in both answers; Present only in the new answer; Present only in the old answer;

If you have lambda-proxy enabled, you need to set the CORS headers manually:
<!-- language: lang-js -->
module.exports.hello = function(event, context, callback) { const response = { statusCode: 200, headers: { "Access-Control-Allow-Origin" : "*", // Required for CORS support to work "Access-Control-Allow-Credentials" : true // Required for cookies, authorization headers with HTTPS }, body: JSON.stringify({ "message": "Hello World!" }) }; callback(null, response); };
https://serverless.com/framework/docs/providers/aws/events/apigateway#enabling-cors
If you have lambda-proxy enabled, you need to set the CORS headers manually:
<!-- language: lang-js -->
module.exports.hello = function(event, context, callback) { const response = { statusCode: 200, headers: { "Access-Control-Allow-Origin" : "*", // Required for CORS support to work "Access-Control-Allow-Credentials" : true // Required for cookies, authorization headers with HTTPS }, body: JSON.stringify({ "message": "Hello World!" }) }; callback(null, response); };
https://serverless.com/framework/docs/providers/aws/events/apigateway#enabling-cors

        
Present in both answers; Present only in the new answer; Present only in the old answer;