Closed ravindra-bh closed 3 months ago
Which versions of the plugins (front/backend) are you using? I think there was a fix for this in the recent release for the new backend system if I remember correctly
Hi @drodil, Looks like after migrating to new backend system, image load is broken, backstage default auth policy do not allow request without auth token, and image load is implemented using html image tag for which is token is not getting set in auth header (fetchMiddlewares are not applied).
quick solution would be to skip attachments path from authPolicy as below, but we need to check how we pass token while loading images:
httpRouter.addAuthPolicy({
allow: 'unauthenticated',
path: '/attachments',
})
I think that change should be enough if I remember correctly. Any chance you could come up with a PR? I am on holiday so cannot really do code changes but I can review and release if necessary.
Closing this as resolved
Hi,
I was trying to use you QnA plugin, and found one issue.
When you ask a question and attach an image in the description of question. Images gets uploaded and saved in database. But when we try to browse question, image is not rendering on UI. see attached screenshot..
I tried to find the root cause, its happening because you are rending image in an tag which is directly hitting api (/api/qeta/attachments/) and this api needs authentication token, which is missing and hence request is not entertained by the server.
If you could provide some solution then it would be great.