Skip to content

Commit 69bd63a

Browse files
Update Allow-Control options for web clients
1 parent 9e4c381 commit 69bd63a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

swift-rest-api/Sources/ProductService/APIGateway.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ public struct APIGatewayProxyResult: Codable {
125125
self.init(
126126
statusCode: statusCode,
127127
headers: ["Content-Type": "application/json",
128-
"Access-Control-Allow-Origin": "*"],
128+
"Access-Control-Allow-Origin": "*",
129+
"Access-Control-Allow-Methods": "OPTIONS,GET,POST,PUT,DELETE",
130+
"Access-Control-Allow-Credentials": "true"],
129131
body: outBody
130132
)
131133
}

0 commit comments

Comments
 (0)