Skip to content

Use cors on static files only? #327

Answered by dorward
vedantroy asked this question in Q&A
Discussion options

You must be logged in to vote

As per the express documentation:

app.use([path,] callback [, callback...])

app.use(cors(options), express.static("public", { maxAge: "1h" }));

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IamLizu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #270 on September 15, 2024 09:41.