Open kevinmcconnell opened 4 months ago
We'll also provide a helper method to make forming the proxy links easier:
I would suggest integrating with Active Storage instead (so no application changes would be required, just a configuration one); see, for example, https://github.com/imgproxy/imgproxy-rails
To provide some safety when linking to user-supplied external images, we can provide a simple image proxy handler. Images accessed through this proxy will only be served if they meet the following criteria:
To serve an image through this proxy, its URL should be passed to the handler's path as a
src
query param. The path is supplied to the application in theIMAGE_PROXY_PATH
environment variable.We'll also provide a helper method to make forming the proxy links easier:
This will result in a URL something like the following, which will route the image request through Thruster's proxy handler: