← Back to team overview

libravatar-fans team mailing list archive

Re: Images Not Loading

 

I'm not sure there is anything you can do, the CSP headers are created
by the application which wasn't setting them correctly in this case.  I
was able to get images loading by adding the following CSP headers to
the pagure configuration file.

CSP_HEADERS = (
    "default-src 'self' https:; " "script-src 'self' 'nonce-{nonce}'; " "style-src 'self' 'nonce-{nonce}';" "img-src 'self' https:; "
)

On 9/27/19 9:55 AM, clime wrote:
> Thanks Michael. I will look what we can do on our side.
>
> On Fri, Sep 27, 2019, 3:41 PM Michael Watters <wattersm@xxxxxxxxxx
> <mailto:wattersm@xxxxxxxxxx>> wrote:
>
>     I found the problem, it appears that Chrome is refusing to load
>     the image.
>
>     Refused to load the image
>     'https://seccdn.libravatar.org/avatar/7fe4cb31868f324cf91dd5acabfabe3a104a67bf8483d89c0ed5dc7b2349a0e2?s=24&d=retro'
>     because it violates the following Content Security Policy
>     directive: "default-src 'self'". Note that 'img-src' was not
>     explicitly set, so 'default-src' is used as a fallback.
>
>
>     On 9/27/19 9:36 AM, Michael Watters wrote:
>>     I've noticed an issue with avatar images not loading in pagure, for
>>     example see the attached screenshot.
>>
>>     Does anybody know what would cause this?  The image URL is correct and I
>>     can open the image without any issues in a separate tab.
>>
>>
>>
>>     _______________________________________________
>>     Mailing list: https://launchpad.net/~libravatar-fans
>>     Post to     : libravatar-fans@xxxxxxxxxxxxxxxxxxx <mailto:libravatar-fans@xxxxxxxxxxxxxxxxxxx>
>>     Unsubscribe : https://launchpad.net/~libravatar-fans
>>     More help   : https://help.launchpad.net/ListHelp
>     _______________________________________________
>     Mailing list: https://launchpad.net/~libravatar-fans
>     Post to     : libravatar-fans@xxxxxxxxxxxxxxxxxxx
>     <mailto:libravatar-fans@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~libravatar-fans
>     More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References