We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dabafe commit 33fd6a0Copy full SHA for 33fd6a0
1 file changed
app/controllers/api/v1/images_controller.rb
@@ -15,7 +15,9 @@ module V1
15
# GET /api/v1/images/proxy?url=https://upload.wikimedia.org/...
16
# Headers: { Authorization: "Bearer <token>" }
17
class ImagesController < BaseController
18
- # SECURITY: Removed skip_before_action - authentication now required
+ # 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]
21
22
ALLOWED_DOMAINS = [
23
'upload.wikimedia.org',
0 commit comments