headline icon indicating copy to clipboard operation
headline copied to clipboard

CORS server error

Open nicolascolla opened this issue 4 years ago • 0 comments

I have ported a fork of headline to Ubuntu Touch (https://github.com/nicolascolla/headline), and it seems to have difficulties retrieving some feeds with the included CORS server. The browser spits out this error:

qml: [JS] (file:///opt/click.ubuntu.com/headline.collaproductions/1.0.1/index.html#eyJmZWVkcyI6WyJodHRwczovL3RhZ2Vzc2NoYXUuZGUveG1sL3JzczIvIl0sImtleXdvcmRzIjoiIn0=:0) Access to fetch at 'https://cors.zserge.com/?u=https%3A%2F%2Ftagesschau.de%2Fxml%2Frss2%2F' from origin 'file://' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I fixed this by changing the CORS server to allorigins (https://github.com/nicolascolla/headline/commit/e1447b298fa22333866645435f6bede83cff6f21)

nicolascolla avatar Nov 12 '21 17:11 nicolascolla