Search Posts

Category: https

angularjs https get Access-Control-Allow-Origin error [duplicate]

This question already has an answer here: XMLHttpRequest cannot load https://www.[website].com/ 6 answers I’m trying to GET json from an open url https://www.instagram.com/donaldduck/?__a=1 but I’m getting this error :”Response to preflight request doesn’t pass access control check: The ‘Access-Control-Allow-Origin’ header has a value ‘null’ that is not equal to the supplied origin. Origin ‘null’ is therefore not allowed access.” app.controller(‘instaCtrl’, function($scope, $http) { $http.get(“https://www.instagram.com/donaldduck/?__a=1”) .then(function(response) { $scope.arragne = response.data; //$scope.media = $scope.arragne.user.media.nodes; console.log(response); }); }); […]

XMLHttpRequest.t.onload and $rootScope:infdig

how to XMLHttpRequest.t.onload and $rootScope:infdig I build a website by mean-stack. In the controller of a page, I have the following code linked to a button: $scope.addFolder() = function () { $http.post(‘/httpOnly/posts/test’, {}, { headers: { Authorization: ‘Bearer ‘ + auth.getToken() } } ) .then(function () { $window.location.href = “https://localhost:3000/help” } } and in the backend, I have router.post(“/httpOnly/posts/test”, auth, function (req, res, next) { return res.json(null) }) Clicking on the button does redirect to […]

Ionic 1 https Forbidden 403

Good Day I need your Help!!! I have a problem on ionic 1 and I encountered a problem, I’m using codeigniter for my backend and when I post data it returns forbidden on my app I don’t know what to do I also added app transport security in Xcode, but yet still not working. Source: AngularJS

Failed to connect socket using https in nodejs

While developing a chat application using nodejs,angular i am trying to connect with socket with the help of namespace using http , it was perfectly working.While i am running the same application with https, it was not connecting to socket code. server require(‘./libs/socketioCode.js’).sockets(https); var options = { key: fs.readFileSync(‘privkey.pem’), cert: fs.readFileSync(‘cert.pem’) }; var server = http.createServer(app).listen(3000); var server1 = https.createServer(options, app).listen(3443); var io = require(‘socket.io’).listen(server1); socket module.exports.sockets = function(https){ io = socketio.listen(https); I tried this […]

AngularJS $http request issue in HTTP and HTTPS

I have a problem in my angularjs $http request. When I send request to the API it was blocked by the browser like: ERROR IN FIREFOX : Blocked loading mixed active content “http://www.example.com/rest/default/V1/integration/admin/token/” ERROR IN CHROME: Mixed Content: The page at ‘https://www.example.com/load.shtml#/register/pos/docs/2323232221555/new‘ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://www.example.com/rest/default/V1/integration/admin/token/‘. This request has been blocked; the content must be served over HTTPS. How can I fixed this problem? Any idea is accepted. […]