Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to set correct host for action-text-attachment figure img src?

Nazrin asked in Rails

My rails 6 app is set up with amazon s3 with a react front-end.
I serve the react front-end with json and in my json I have Post model with a rich content body.
In the body I have added an image. When I serve the body in the json (body.body.to_s), the figure img src inside the action-text-attachment for my image uses http://example.org instead of my rails app hostname.
I tried setting default url options host to no avail. Please, I've looked through the internet for anything that could help and come up with nothing.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.