Saturday, 31 August 2013

How to permit access to a different port?

How to permit access to a different port?

The Amber Smalltalk IDE works with a server written in nodejs. How can I
configure the server that XMLHttpRequests going to a different port of the
same domain are allowed?
The default access to Amber is
http://127.0.0.1:4000/
And | req |
req := XMLHttpRequest new.
req open: 'GET' url: 'http://127.0.0.1:5984/' asynchronous: false.
req send: ''.
Notes
The server is called from
amber-master\bin\server.bat
The server is in
amber-master\cli\js\amber-cli.js
The client is Firefox which should allow that the XMLHttpRequest objects
may access a different port provided the server indicates this.
References
http://www.w3.org/TR/cors/#access-control-allow-origin-response-header

No comments:

Post a Comment