-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helmet as default express middleware in react-server-cli #812
Conversation
@@ -143,7 +143,7 @@ export default (webpackConfig) => { | |||
In the `.reactserverrc` file add an option for `webpackConfig` that points to that function file and when React Server is setting up Webpack it will call your function with the result of the built in Webpack options, allowing you to make any modifications needed. This may also be specified on the command line with the `--webpack-config=<FILE>` option. | |||
|
|||
### Use Custom Express Middleware | |||
Currently the default Express Middlewares used are compression, body-parser, cookie-parser. If you need to setup custom express middleware you can do it with a setup function. | |||
Currently the default Express Middlewares used are compression, body-parser, cookie-parser, helmet with default configuration. If you need to setup custom express middleware you can do it with a setup function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've got enough of these that maybe we should break them out into a bullet list?
Would also be helpful to link them to the project pages so people who aren't familiar with them (I'd never heard of helmet) can learn more.
@feychou Thanks for this. Nice to address so many issues at once! It's unfortunately already diverged from master and has a conflict. Please rebase if you get a chance. |
Addresses these website issues:
#640
#641
#639
It relies on helmet's default configuration; its overall purpose is to make react-server apps more secure by default.