Error 404 "Access-Control-Allow-Origin"
eranotz50 at gmail.com
eranotz50 at gmail.com
Wed Jun 17 06:51:35 UTC 2015
XMLHttpRequest cannot load https://landfill.bugzilla.org/rest/login?login=userName&password=pwd. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://..' is therefore not allowed access. The response had HTTP status code 404.
When i try to login from my javascript code.
$http.get(https://landfill.bugzilla.org/rest/login?login=userName&password=pwd);
I read somewhere that you have to supply the http header with credentials
when requesting your html.
i used a node module for this issue named CORS which enables you to perform cross domain requests.
https://www.npmjs.com/package/cors
my server :
var express = require('express');
var cors = require('cors');
var path = require('path');
var app = express();
app.use(cors());
app.use(express.static(path.resolve(__dirname, 'client')));
app.listen(8080);
I would appreciate any help in resolving this issue. 10x.
_______________________________________________
dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-apps-bugzilla
More information about the developers
mailing list