Comments (7)
SEC7120: Origin http://localhost:8000 not found in Access-Control-Allow-Origin header.
Is localhost:8000 included in the Access-Control-Allow-Origin header?
from cordova-browser.
@janpio , hi, how can i do it ?
from cordova-browser.
How you can find out if it is? Look at the server code generating the response. If you don't control the server, the response is most probably no, but you can check using your browser's dev tools's network panel where you can look at the headers of the response.
from cordova-browser.
@janpio ,I can use below header method in my php codes and it works fine but it does not secure!
<?php header('Access-Control-Allow-Origin: *'); //for all ?>
my question is: Do i have the same problem in IOS/Android platform? or it is just for Browser platform? cause i didn't test it on other platform like android or IOS. I'm new in cordova.
thank you so much
from cordova-browser.
You don't have to put *
, adding it for the hostname in the error message should be enough.
This is a CORS problem, so you might have or not have the same problem on native platforms depending on how exactly the request is sent. Hard to predict, you best try it out.
from cordova-browser.
@salehmosleh think that you need to include connect-self on the security policy meta, including the host, something like: https://github.com/benitogf/hotpot/blob/master/client/src/index.pug#L8
from cordova-browser.
SEC7120: Origin http://localhost:8000 not found in Access-Control-Allow-Origin header.
Is stating that whatever server you're trying to access is being blocked because they have CORS enabled and you're server isn't the allowed origin. The server needs to send the Access-Control-Allow-Origin
header with the value of http://localhost:8000
or use the *
wildcard.
MDN has a good resource that explains everything you need to know about CORS. I've also written a blog post on this, while the subject is about iOS and the WKWebView... the CORS concept is still the same.
I'm closing this because this is not a bug with Cordova.
from cordova-browser.
Related Issues (20)
- Warning about non-existing config.xml emitted during browser platform restore HOT 2
- Bump shelljs ⥠0.8.5 HOT 1
- Add an optional flag to prevent opening a new browser tab
- Any timeline for a cordova-browser release 6.0.1 with security fixes? HOT 7
- Serve over HTTPS HOT 2
- Getting cp: dest is not a directory (too many sources) on copying folders HOT 1
- cordova create - install browser - plugins.jsâ was blocked HOT 10
- Cordova "deviceready" not getting fired on browser platform
- Unable to specify browser target
- Requirements check results for browser: Cannot read property 'forEach' of undefined HOT 1
- Build steps to use in angular cli HOT 1
- page lifecycle HOT 10
- where is cordova-browser Documentation? HOT 4
- url.URL is not a constructor HOT 2
- plugin.xml is missing HOT 2
- 'cordova run' command issue
- https? cordova run browser HOT 2
- favicon overwrite HOT 2
- PACKAGE_NAME wrong in browser.json HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
ð Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ððð
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â€ïž Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-browser.