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
Issue rendering images on nodes when hosting own node with GCP_BUCKET #71
Comments
i think the only option is to either allow a the generic google bucket domain on all nodes, or allow any domain for image embeds on all nodes (eg disabled csp for images) |
So if you watch this quick video, you will notice that if you set up with no credentials and just use images.bitclout.com that the images will post fine on your node and all others |
@MirekR I would recommend using the bitclout.com upload-image endpoint. |
@maebeam I guess we can use it but what is the point allowing to change the bucket then? @marnimelrose thanks for the video but not sure it that’s 100% correct. The node front end seems to be using the bitclout.com uplod-image endpoint (as maebeam suggested to use as well) regardless of the settings. Issue arise when you try to call the upload-image endpoint (from mobile app for example). If you set it up as you suggest, it fails the upload. |
@maebeam ive seen reports that using the default bitclout one does not work from non bitclout.com nodes - but have not tested this myself. will test today |
@tijno Let me know if you get CORS. I am happy to turn off CORS for that endpoint. |
Looks like it maybe @maebeam - although this could relate to my CSP on frontend but I do have |
That looks like a CSP error to me |
@tijno you might want to change image-src, not connect-src to make it work? |
its the api upload req to bitclout.com that fails - cant get csp update in Caddyfile to stick somehow so still waiting to rule out csp issue on my end |
The issue on my end was that bitclout.com was no longer in my Caddyfile CSP section and cloudflare caching was delaying any changes from showing up. @MirekR All working correctly now and I was able to post images from my node using the default empty |
I'm going to close this since it appears everything is working as intended. |
Hey there, we have setup our node, setup GCP_BUCKET_NAME and GCP_CREDENTIALS_PATH, we're able to upload images to the GCP_BUCKET without issue,
So far so good, buut
I had to update the Caddy file to be able to display images from our bucket to mitigate CSP blocking on our node (adding our bucket address to the img-src - see the Caddyfile attached) . After that, we can display images on our own node, but other nodes (starting with bitclout.com) are not loading images with error "(blocked:csp)". Is there a way how to enable images from our gcp bucket or what is general approach to this when you host your own node and bucket storage?
Post example:
Our, working, node:
https://node.flickapp.com/posts/8b2877038285a0e2ed59caa3228305f9e91ae0aee68a34ca2d2ac6a82a3530b3
Bitclout node, same post is not displaying image with - (blocked:csp)
https://bitclout.com/posts/8b2877038285a0e2ed59caa3228305f9e91ae0aee68a34ca2d2ac6a82a3530b3
Any advice what we can setup to avoid image breakdown on other nodes?
Caddyfile.dev.txt
Thanks for any advice.
The text was updated successfully, but these errors were encountered: