Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 409
    • Issues 409
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Issues
  • #880
Closed
Open
Issue created Jul 03, 2019 by Agate@agateMaintainer

Improve the security via HTTP headers

We're currently missing a CSP policy to help preventing the loading of external resources such as fonts, javascript or images. We could also prevent Iframe loading on all pages (except embeds) using X-Frame-Options.

My initial attempts at a generating a CSP policy yield this: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:

With this policy, the app loads without any CSP warning (at least during my tests). The unsafe-unline and unsafe-eval bits could possibly removed if we added the CSP headers at the Python level (appending a nonce= to the stylesheets and javascripts files. However, this would require a bit more work.

We also might want to set the X-XSS-Protection, X-Content-Type-Options and Referrer-Policy headers too.

Assignee
Assign to
Time tracking