Skip to content

Permissive CORS on image-proxy #7

Description

@BadAtCaptchas

Description

The image proxy returns Access-Control-Allow-Origin: *, allowing any website to use it.

Affected File

app/api/image-proxy/route.ts

Current Behavior

'Access-Control-Allow-Origin': '*',

Suggested Fix

Restrict to known origins or remove if not needed for cross-origin access:

'Access-Control-Allow-Origin': process.env.ALLOWED_ORIGIN || 'http://localhost:3000',

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions