Skip to content

Commit

Permalink
debugging cors errors
Browse files Browse the repository at this point in the history
  • Loading branch information
acekyd committed Aug 19, 2024
1 parent 4ff9d54 commit 89461d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ const myPFIServer5 = createPFIServer({bearerDid: config.pfiDid[4], port: config.
const issuerApi = express()
const issuerPort = 3001

issuerApi.use(snooper())

// Allow cross-origin requests
issuerApi.use(cors())
issuerApi.use(snooper())

issuerApi.get('/', (req, res) => {
res.send(
Expand All @@ -242,6 +242,7 @@ issuerApi.get('/kcc', async (req, res) => {
req.query.country as string,
req.query.did as string,
)
console.log('kcc request headers:', res.getHeaders()) // Log headers
res.send(credentials)
})

Expand Down

0 comments on commit 89461d1

Please sign in to comment.