question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Origin 'null' in request

See original GitHub issue

Hi,

I’m trying to use WikiJs directly from the client within webpack environment. Unfortunately, I get the following error:

Fetch API cannot load https://en.wikipedia.org/w/api.php?prop=info%7Cpageprops&inprop=url&ppprop=disambiguation&titles=Batman&format=json&action=query&redirects=. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

which leads to:

Uncaught (in promise) TypeError: Failed to fetch

what am I missing?

Thanks in advance

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Mechasparrowcommented, Apr 8, 2017

@LeonLiber I’d highly recommend you open a separate issue, so this can be handled better.

1reaction
dijscommented, Mar 27, 2017

This is a known issue. It’s a CORS issue.

You could circumvent this by running wikijs from within a WebWorker, which would be preferred anyway since it will not block the UI thread.

But the real solution of using the JSONP WikiMedia API has not been implemented yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Origin null is not allowed by Access-Control ...
“Origin null is not allowed by Access-Control-Allow-Origin” error for request made by application running from a file:// URL · 1. What does the ......
Read more >
How does setting Origin to null in a redirected CORS ...
If a cross-origin resource redirects to another resource at a new origin, the browser will set the value of the Origin header to...
Read more >
Access-Control-Allow-Origin - HTTP - MDN Web Docs - Mozilla
Many User Agents will grant such documents access to a response with an Access-Control-Allow-Origin: "null" header, and any origin can create a ...
Read more >
Write-up: CORS vulnerability with trusted null origin @ ...
This write-up for the lab CORS vulnerability with trusted null origin is part of my walk-through series for PortSwigger's Web Security Academy.
Read more >
Lab: CORS vulnerability with trusted null origin
This website has an insecure CORS configuration in that it trusts the "null" origin. To solve the lab, craft some JavaScript that uses...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found