Skip to content

Commit

Permalink
support cors
Browse files Browse the repository at this point in the history
  • Loading branch information
CNCF-Bot committed Mar 2, 2023
1 parent d8c453c commit 0b0314f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/api/items.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ const processRequest = module.exports.processRequest = query => {
// Netlify function
module.exports.handler = async function(event) {
const body = processRequest(event.queryStringParameters)
const headers = { 'Content-Type': 'application/json' }
const headers = {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Credentials': true
}
return { statusCode: 200, body: JSON.stringify(body), headers }
}

0 comments on commit 0b0314f

Please sign in to comment.