[PR #908] [MERGED] feat: add CSP header #559

Closed
opened 2025-10-08 00:12:56 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/908
Author: @stonith404
Created: 9/2/2025
Status: Merged
Merged: 9/7/2025
Merged by: @ItalyPaleAle

Base: mainHead: feat/csp-header


📝 Commits (9)

  • 444e089 feat: add CSP header
  • 3a3655e Update backend/internal/middleware/csp_middleware.go
  • 79b26bb Avoid scanning the index file and allocating slices on every call
  • 5cbe897 proxy release check trough the backend
  • 9a23884 Update backend/internal/service/version_service.go
  • b2e7239 Update backend/internal/service/version_service.go
  • a119c30 use generic atomic pointer
  • 14a7ace Merge remote-tracking branch 'origin/feat/csp-header' into feat/csp-header
  • bfc995d extract caching into util and handle multiple concurrent calls and fallback on error

📊 Changes

9 files changed (+343 additions, -102 deletions)

View changed files

📝 backend/frontend/frontend_included.go (+76 -4)
📝 backend/internal/bootstrap/router_bootstrap.go (+2 -0)
📝 backend/internal/bootstrap/services_bootstrap.go (+3 -0)
backend/internal/controller/version_controller.go (+40 -0)
backend/internal/middleware/csp_middleware.go (+53 -0)
backend/internal/service/version_service.go (+74 -0)
backend/internal/utils/cache_util.go (+78 -0)
📝 frontend/src/lib/services/version-service.ts (+6 -94)
📝 frontend/src/routes/settings/+layout.ts (+11 -4)

📄 Description

Fixes #894


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pocket-id/pocket-id/pull/908 **Author:** [@stonith404](https://github.com/stonith404) **Created:** 9/2/2025 **Status:** ✅ Merged **Merged:** 9/7/2025 **Merged by:** [@ItalyPaleAle](https://github.com/ItalyPaleAle) **Base:** `main` ← **Head:** `feat/csp-header` --- ### 📝 Commits (9) - [`444e089`](https://github.com/pocket-id/pocket-id/commit/444e089dcfd703191c8a78f19c5c4bff1110b56e) feat: add CSP header - [`3a3655e`](https://github.com/pocket-id/pocket-id/commit/3a3655eea6395fc8a87dcb3871a595cde8c9550a) Update backend/internal/middleware/csp_middleware.go - [`79b26bb`](https://github.com/pocket-id/pocket-id/commit/79b26bb1e4c66fed06df1410a896c753df3b3ef9) Avoid scanning the index file and allocating slices on every call - [`5cbe897`](https://github.com/pocket-id/pocket-id/commit/5cbe897864b0d595be653a769cba4c850529c5db) proxy release check trough the backend - [`9a23884`](https://github.com/pocket-id/pocket-id/commit/9a23884412bd2fc443e1132b4a771d2d2928c456) Update backend/internal/service/version_service.go - [`b2e7239`](https://github.com/pocket-id/pocket-id/commit/b2e72394205e0a15368e7904823b07ca08f29c02) Update backend/internal/service/version_service.go - [`a119c30`](https://github.com/pocket-id/pocket-id/commit/a119c30fc088a7eec8c477b54ac6a4378a3a8cac) use generic atomic pointer - [`14a7ace`](https://github.com/pocket-id/pocket-id/commit/14a7ace202603fa3048ddc474f8f92e01eb6567b) Merge remote-tracking branch 'origin/feat/csp-header' into feat/csp-header - [`bfc995d`](https://github.com/pocket-id/pocket-id/commit/bfc995db37564495f7effbbdbd9c614fa935d3dd) extract caching into util and handle multiple concurrent calls and fallback on error ### 📊 Changes **9 files changed** (+343 additions, -102 deletions) <details> <summary>View changed files</summary> 📝 `backend/frontend/frontend_included.go` (+76 -4) 📝 `backend/internal/bootstrap/router_bootstrap.go` (+2 -0) 📝 `backend/internal/bootstrap/services_bootstrap.go` (+3 -0) ➕ `backend/internal/controller/version_controller.go` (+40 -0) ➕ `backend/internal/middleware/csp_middleware.go` (+53 -0) ➕ `backend/internal/service/version_service.go` (+74 -0) ➕ `backend/internal/utils/cache_util.go` (+78 -0) 📝 `frontend/src/lib/services/version-service.ts` (+6 -94) 📝 `frontend/src/routes/settings/+layout.ts` (+11 -4) </details> ### 📄 Description Fixes #894 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-08 00:12:56 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#559