Hello Grist community,
Again thanks for your efforts in (Grist, forum, communications, documentation, listening, …)
I’m having trouble integrating data images into templates (HTML, markdown, etc.). On the cloud, using the API for attachments poses no issue, as described here Photo Markdown - Grist, provided the document is public.
However, when attempting this locally on a self-hosted Grist as below :
- Docker omnibus installation and email/password authentication were successful.
- Since it’s self-hosted on a LAN, the URL follows the format http://192… with no HTTPS.
- I tried incorporating a render_html custom widget with the following code:
html
<h1>Test</h1>
<img src=http://192.168.1.25:9999/api/docs/3o1CbBsHfEKR/attachments/1/download>
Unfortunately, the rendered images appears broken.
- A media type column with a similar link works well, allowing image downloads.
- The link appears correct in the DOM inspector, but the console shows a request transformation to HTTPS, resulting in a 404 error.
Suspecting sanitization, I removed DOMPurify from the render_html widget, but encountered the same issue.
While not well-versed in network details, it seems there’s a normal secure request transformation dut to the use of external ressources to render html (render_html custom widget served from grist github).
Is it correct ?
If confirmed, do serving custom_plugins locally on the same machine would might resolve the issue, ensuring all requests originate from the same source and bypass HTTPS transformation ?
If yes , what would be the simplest way to serve custom_widgets from ?
Many thanks for your clarifications