Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Szabolcs Szabolcsi-Toth committed Jun 9, 2024
1 parent e638f08 commit d1cf640
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ export function middleware(request) {
// retrieve the current response
const res = NextResponse.next()

console.log('middleware cors', request)
console.log('headers', request.headers)
console.log('middleware cors', request.headers.get('origin'))

// add the CORS headers to the response
res.headers.append('Access-Control-Allow-Credentials', "true")
res.headers.append('Access-Control-Allow-Origin', '*') // replace this your actual origin
res.headers.append('Access-Control-Allow-Origin', request.headers.get('origin')) // replace this your actual origin
res.headers.append('Access-Control-Allow-Methods', 'GET,DELETE,PATCH,POST,PUT')
res.headers.append(
'Access-Control-Allow-Headers',
Expand Down

0 comments on commit d1cf640

Please sign in to comment.