-
Notifications
You must be signed in to change notification settings - Fork 200
feat: adding corsOptions config variable for CORS middleware in app.js #429
Conversation
Thanks so much for opening your first pull request! Please check out our contributing guidelines. |
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
3e7f553
to
2de4480
Compare
If you need anything from me to move forward with the PR, please let me know @juliomrqz |
There were the following issues with this Pull Request
You may need to change the commit messages to comply with the repository contributing guidelines. 🤖 This comment was generated by commitlint[bot]. Please report issues here. Happy coding! |
fixing yarn lint error with git status
6206bee
to
bdfaa76
Compare
The CI is failing because of your linter about changes that I have not committed. It initially complained about my use of |
Summary
The idea of this PR is simple - introduce an optional
corsOptions
parameter to thesiteConfig
, so that one can e.g. create an Angular/React/... app where the Statusfy API is reachable without the typical CORS header errors in modern browsers like Chrome. IfcorsOptions
is not set, nothing changes to the CORS middleware settings in Express. I have also added this to the Configuration documentation with a link to the official Express documentation. Since there is no data where authentication is needed, I thought it's harmless to give'*'
as the parameter fororigin
but made a note for users to check out the official documentation on the middleware if they have not used it before. No tests were written for this feature.What kind of change does this PR introduce? (check at least one)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes: