Ask Your Question
0

OpenDaylight Toolkit simple project

asked 2014-12-08 00:11:05 -0700

Amir gravatar image

Dear,

I have tried to run ODL toolkit;s simple project and I did exactly like the tutorial ( https://wiki.opendaylight.org/view/OpenDaylight_Toolkit:Main ). when I run the server and when i try to develop ( http://127.0.0.1:8000 ) , the following error will appear:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/simple/northbound/simple . This can be fixed by moving the resource to the same domain or enabling CORS.

I have performed this command: nodejs provision.js --scaffold 127.0.0.1 and I successfully ran the server.js

Does any body can help?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-12-09 23:24:34 -0700

Amir gravatar image

just I added the following to app.js and problem solved:

$.ajaxSetup({ type: 'POST', username: 'admin', password: 'admin', data: {}, dataType: 'json', xhrFields: { withCredentials: true }, crossDomain: true, success: 'callback', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' } });

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2014-12-08 00:11:05 -0700

Seen: 141 times

Last updated: Dec 09 '14