Skip to content

CORS error in 05-http.elm #136

@sbfram

Description

@sbfram

Hi,

There's a CORS issue when running the 05-http.elm example in the tutorial. Chrome tells me

Access to XMLHttpRequest at 'https://elm-lang.org/assets/public-opinion.txt' from origin 'null' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://worker.elm-lang.org' that is not equal to the supplied origin.

I changed the example to request a file from a server that I could configure with Access-Control-Allow-Origin : * and that worked. Thought I'd post this here so that other Elm beginners who Google the error will understand that it's not a bug in the example per se, but appears to be a configuration issue on the server side.

Thanks,
Steve

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