CSP error on gravatar #86

Closed
opened 2026-09-29 12:38:34 +00:00 by benjamin.broersma · 1 comment

See https://code.overheid.nl/ForumStandaardisatie/beslisboom-open-standaarden and my user image, which is loaded from gravitar, but disallowed/blocked by the CSP:

Loading the image 'https://secure.gravatar.com/avatar/824175c3b86324f07d0dde52f8f8cb30de6d3fc72b6af77c5d097f5d3dbaf44c?d=identicon' violates the following Content Security Policy directive: "img-src 'self' data: blob:". The action has been blocked

Two options:

  1. Disable gravatar, the only reference is in some config-cheat-sheet that still references the Gitea version of when the config parameter got deprecated, it should be possible to change it in the admin panel:

    DISABLE_GRAVATAR: false: Enable this to use local avatars only. DEPRECATED [v1.18+] moved to the database. Use the admin panel to configure.

  2. Allow gravatar by adding https://secure.gravatar.com/avatar/ to img-src

Related:

See https://code.overheid.nl/ForumStandaardisatie/beslisboom-open-standaarden and my user image, which is loaded from gravitar, but disallowed/blocked by the CSP: ```none Loading the image 'https://secure.gravatar.com/avatar/824175c3b86324f07d0dde52f8f8cb30de6d3fc72b6af77c5d097f5d3dbaf44c?d=identicon' violates the following Content Security Policy directive: "img-src 'self' data: blob:". The action has been blocked ``` Two options: 1. Disable gravatar, the only reference is in some [config-cheat-sheet](https://forgejo.org/docs/latest/admin/config-cheat-sheet/#picture-picture) that still references the Gitea version of when the config parameter got deprecated, it should be possible to change it in the admin panel: > **`DISABLE_GRAVATAR`: false**: Enable this to use local avatars only. **DEPRECATED [v1.18+]** moved to the database. Use the admin panel to configure. 2. Allow gravatar by adding `https://secure.gravatar.com/avatar/` to `img-src` Related: - #11 - #26 - #43
benjamin.broersma changed title from CSP error on gravatargravatar to CSP error on gravatar 2026-09-29 12:38:42 +00:00

Gravatar en federated avatars staan nu uit.

Gravatar en federated avatars staan nu uit.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/docs#86
No description provided.