expressjs / expressjs/cors

CORS error when fonts

Open
#309 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.2k
Forks
512
PR merge metrics
No merged PRs in 30d

Description

Hi!
I use static files and fonts, there are no CORS errors with js and css.
The error is only on the fonts, what could be the problem?
Example settings:

```
app.use(
cors({
origin: ['https://myurl.com'],
methods: ['GET', 'POST', 'DELETE', 'UPDATE', 'PUT', 'PATCH', 'OPTIONS'],
allowedHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept']
})
);

app.use(express.static('public'));
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.