Skip to content

Docs: explain how to deal with CORS #8

@nhoizey

Description

@nhoizey

I've installed this on my own domain screenshots.nicolas-hoizey.com hosted on Netlify.

It works well when run in the browser:
https://screenshots.nicolas-hoizey.com/https%3A%2F%2Fcloudfour.com%2Fthinks%2Fsvg-icon-stress-test%2F/large/

But I get a CORS error when I try to use this image in a page on another domain:
image

I tried to add this to my netlify.toml file, but it doesn't fix the issue:

[[headers]]
  for = "/*"
    [headers.values]
    Access-Control-Allow-Origin = "*"

Is there something specific to do because it's a Netlify Function?

There might be something here: https://stackoverflow.com/a/57974136/717195

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions