-
Notifications
You must be signed in to change notification settings - Fork 443
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
Don't add ActionDispatch::Static middleware continued #1892
Don't add ActionDispatch::Static middleware continued #1892
Conversation
In the case that rails do not serve static files is not necessary to add ActionDispatch::Static middleware. Making possible to deploy ViewComponenets previews on a production environment where Nginx or Apache is managing the static files.
Co-authored-by: Joel Hawksley <[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.
Thanks for picking this up @reeganviljoen!
Co-authored-by: Cameron Dutro <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
Co-authored-by: Cameron Dutro <[email protected]>
@camertron can you please re-review this when you can 🙏 |
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.
Thanks @reeganviljoen, looks good 👍
@camertron Its been rebased and is ready to merge 🙏 |
Co-authored-by: Hans Lemuet <[email protected]>
…1892) * Don't add ActionDispatch::Static middleware In the case that rails do not serve static files is not necessary to add ActionDispatch::Static middleware. Making possible to deploy ViewComponenets previews on a production environment where Nginx or Apache is managing the static files. * Apply suggestions from code review Co-authored-by: Joel Hawksley <[email protected]> * Update index.md * add: prism cdn if no asset precompiler found * edit: change prism cdn version to 1.28 * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update lib/view_component/engine.rb Co-authored-by: Cameron Dutro <[email protected]> * edit: fix brocken tests * edit: refactor tests * edit: fix for rails > 6.1 * edit: fix lint issues * Update lib/view_component/engine.rb Co-authored-by: Hans Lemuet <[email protected]> --------- Co-authored-by: Daniel Gonzalez <[email protected]> Co-authored-by: Joel Hawksley <[email protected]> Co-authored-by: Cameron Dutro <[email protected]> Co-authored-by: Hans Lemuet <[email protected]>
…1892) * Don't add ActionDispatch::Static middleware In the case that rails do not serve static files is not necessary to add ActionDispatch::Static middleware. Making possible to deploy ViewComponenets previews on a production environment where Nginx or Apache is managing the static files. * Apply suggestions from code review Co-authored-by: Joel Hawksley <[email protected]> * Update index.md * add: prism cdn if no asset precompiler found * edit: change prism cdn version to 1.28 * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update app/helpers/preview_helper.rb Co-authored-by: Cameron Dutro <[email protected]> * Update lib/view_component/engine.rb Co-authored-by: Cameron Dutro <[email protected]> * edit: fix brocken tests * edit: refactor tests * edit: fix for rails > 6.1 * edit: fix lint issues * Update lib/view_component/engine.rb Co-authored-by: Hans Lemuet <[email protected]> --------- Co-authored-by: Daniel Gonzalez <[email protected]> Co-authored-by: Joel Hawksley <[email protected]> Co-authored-by: Cameron Dutro <[email protected]> Co-authored-by: Hans Lemuet <[email protected]>
What are you trying to accomplish?
I am attempting to finish #1091 by adding prism through a cdn when no asset pipeline is present
What approach did you choose and why?
When their is no asset pipeline I decided to serve prism through a cdn