Skip to content

Commit 33fd6a0

Browse files
committed
fix: solve sidekiq allowed content
1 parent 6dabafe commit 33fd6a0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/controllers/api/v1/images_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ module V1
1515
# GET /api/v1/images/proxy?url=https://upload.wikimedia.org/...
1616
# Headers: { Authorization: "Bearer <token>" }
1717
class ImagesController < BaseController
18-
# SECURITY: Removed skip_before_action - authentication now required
18+
# ALLOWED_DOMAINS + HTTPS-only + SSRF protection are sufficient guards;
19+
# JWT auth is skipped because browsers cannot attach Authorization headers to <img> src requests.
20+
skip_before_action :authenticate_request!, only: [:proxy]
1921

2022
ALLOWED_DOMAINS = [
2123
'upload.wikimedia.org',

0 commit comments

Comments
 (0)