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

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.

Join the discussion

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.