Skip to content
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

Cross-Origin Request Issue After Migrating to Importmaps + Propshaft in Production via Kamal 2 #221

Closed
brodienguyen opened this issue Nov 21, 2024 · 0 comments

Comments

@brodienguyen
Copy link

Hi there,

I'm experiencing a Cross-Origin Request issue after migrating from Webpacker + Sprockets to Importmaps + Propshaft in my Rails application, which is deployed using Kamal2 in production. All the assets are served via our CDN and we did configure config.asset_host with the base URL of our CDN in production.rb.

Here is a couple details of our application:

  • Rails: v7.1.4.1
  • importmap-rails: latest
  • propshaft: latest

For CSS, we are using dartsass-rails and looks like all the CSS have been loaded just fine. However, all the JS files (e.g. Stimulus controller, channels) are blocked due to CORS issue.

BrodieMFL 2024-11-20 at 10 42 13

Could anyone provide guidance on resolving this issue or suggest further troubleshooting steps? Any insights or similar experiences would be greatly appreciated.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant