The documentation for how this is used is shown as:
server.pre(cors.preflight);
server.use(cors.actual);
This would add cors for all endpoints in an application, which is not what I want. Instead, how can I add cors to only one specific route? In other words, say I want my server.get('/foo', fn) to use cors, but not server.get('/bar', fn) ... How can I do that?
The documentation for how this is used is shown as:
This would add cors for all endpoints in an application, which is not what I want. Instead, how can I add cors to only one specific route? In other words, say I want my
server.get('/foo', fn)to use cors, but notserver.get('/bar', fn)... How can I do that?