-
Notifications
You must be signed in to change notification settings - Fork 77
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
Better support API-only Rails applications #1128
Conversation
Co-authored-by: Adrianna Chang <[email protected]>
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.
Small suggestions on the docs but otherwise looks good! Thanks for getting this up!
README.md
Outdated
### Using Maintenance Tasks in API-only applications | ||
|
||
The Maintenance Tasks engine uses Rails sessions for flash messages and storing | ||
the CRSF token. For the engine to work in an API-only Rails application, you need |
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.
the CRSF token. For the engine to work in an API-only Rails application, you need | |
the CSRF token. For the engine to work in an API-only Rails application, you need |
README.md
Outdated
|
||
The Maintenance Tasks engine uses Rails sessions for flash messages and storing | ||
the CRSF token. For the engine to work in an API-only Rails application, you need | ||
to add a [session middleware][] and the Flash middleware. The engine also defines |
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.
Maybe let's call out the Flash middleware more explicitly?
to add a [session middleware][] and the Flash middleware. The engine also defines | |
to add a [session middleware][] and the `ActionDispatch::Flash` middleware. The engine also defines |
README.md
Outdated
a strict [Content Security Policy][], but it won't make it to the user's browser | ||
unless you also include the appropriate middleware | ||
(`ActionDispatch::ContentSecurityPolicy::Middleware`). |
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.
Tiny nit: can we make the wording on this more action-oriented?
a strict [Content Security Policy][], but it won't make it to the user's browser | |
unless you also include the appropriate middleware | |
(`ActionDispatch::ContentSecurityPolicy::Middleware`). | |
a strict [Content Security Policy][]. Make sure to include `ActionDispatch::ContentSecurityPolicy::Middleware` | |
in your app's middleware stack to ensure the CSP is delivered to the user's browser. |
Co-authored-by: Adrianna Chang <[email protected]>
47b379f
to
49fa2b7
Compare
Fix #992
While we can't automatically get full compatibility with API-only applications, we can make it easier by not using
PUT
and documenting how to add the missing middleware necessary for our engine.