Skip to content

Commit 3740832

Browse files
authored
Merge pull request spring-media#9 from spring-media/add-patch
added patch to cors methods
2 parents cc740f5 + b72c17e commit 3740832

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/proxyIntegration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const NO_MATCHING_ACTION = request => {
99

1010
function addCorsHeaders(toAdd) {
1111
toAdd["Access-Control-Allow-Origin"] = "*";
12-
toAdd["Access-Control-Allow-Methods"] = "GET,POST,PUT,DELETE,HEAD";
12+
toAdd["Access-Control-Allow-Methods"] = "GET,POST,PUT,DELETE,HEAD,PATCH";
1313
toAdd["Access-Control-Allow-Headers"] = "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token";
1414
return toAdd;
1515
}

test/proxyIntegration.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function forEach(arrayOfArrays) {
1616
const proxyIntegration = require('../lib/proxyIntegration');
1717
const expectedCorsHeaders = {
1818
"Access-Control-Allow-Origin": "*",
19-
"Access-Control-Allow-Methods": "GET,POST,PUT,DELETE,HEAD",
19+
"Access-Control-Allow-Methods": "GET,POST,PUT,DELETE,HEAD,PATCH",
2020
"Access-Control-Allow-Headers": "Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token"
2121
};
2222

0 commit comments

Comments
 (0)