Recompiling the server to allow cross origin resource sharing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Recompiling the server to allow cross origin resource sharing

Paul DeBruicker
Hi

I'm trying to be able to use amber inside a seaside application by loading amber using the node server. The seaside app is served with Comanche. The amber browser works well and I changed the URL in Browser>>#ajaxPut:data: to point to 127.0.0.1:4000  

The problem comes when I actually do the PUT I get an error that says I need to set the Access-Control-Allow-Origin header in the response.

How can I recompile the server.js file to reflect changes I make in FileServer.st?


Thanks

Paul
Reply | Threaded
Open this post in threaded view
|

Re: Recompiling the server to allow cross origin resource sharing

Amber Milan Eskridge
I suppose you can't.  Access-Control-Allow-Origin imu prevents a JavaScript-Application from accessing a domain which it wasn't served from. you have to make sure, that the JSs are loaded from the same origin. 

You could add amber as a static ressource to seaside
You could put a proxy in front of both.

On Sat, Apr 14, 2012 at 9:55 PM, Paul DeBruicker <[hidden email]> wrote:
Hi

I'm trying to be able to use amber inside a seaside application by loading amber using the node server. The seaside app is served with Comanche. The amber browser works well and I changed the URL in Browser>>#ajaxPut:data: to point to 127.0.0.1:4000

The problem comes when I actually do the PUT I get an error that says I need to set the Access-Control-Allow-Origin header in the response.

How can I recompile the server.js file to reflect changes I make in FileServer.st?


Thanks

Paul

Reply | Threaded
Open this post in threaded view
|

Re: Recompiling the server to allow cross origin resource sharing

Paul DeBruicker
I think this describes a method:

I just can't change the settings of ambers node.js server conveniently without recompiling the FileServer.st file



On Apr 14, 2012, at 1:02 PM, Amber Milan Eskridge <[hidden email]> wrote:

I suppose you can't.  Access-Control-Allow-Origin imu prevents a JavaScript-Application from accessing a domain which it wasn't served from. you have to make sure, that the JSs are loaded from the same origin. 

You could add amber as a static ressource to seaside
You could put a proxy in front of both.

On Sat, Apr 14, 2012 at 9:55 PM, Paul DeBruicker <[hidden email]> wrote:
Hi

I'm trying to be able to use amber inside a seaside application by loading amber using the node server. The seaside app is served with Comanche. The amber browser works well and I changed the URL in Browser>>#ajaxPut:data: to point to 127.0.0.1:4000

The problem comes when I actually do the PUT I get an error that says I need to set the Access-Control-Allow-Origin header in the response.

How can I recompile the server.js file to reflect changes I make in FileServer.st?


Thanks

Paul

Reply | Threaded
Open this post in threaded view
|

Re: Recompiling the server to allow cross origin resource sharing

Amber Milan Eskridge
Oh

I wasn't aware that this is possible.

On Sat, Apr 14, 2012 at 10:08 PM, Paul DeBruicker <[hidden email]> wrote:
I think this describes a method:

I just can't change the settings of ambers node.js server conveniently without recompiling the FileServer.st file



On Apr 14, 2012, at 1:02 PM, Amber Milan Eskridge <[hidden email]> wrote:

I suppose you can't.  Access-Control-Allow-Origin imu prevents a JavaScript-Application from accessing a domain which it wasn't served from. you have to make sure, that the JSs are loaded from the same origin. 

You could add amber as a static ressource to seaside
You could put a proxy in front of both.

On Sat, Apr 14, 2012 at 9:55 PM, Paul DeBruicker <[hidden email]> wrote:
Hi

I'm trying to be able to use amber inside a seaside application by loading amber using the node server. The seaside app is served with Comanche. The amber browser works well and I changed the URL in Browser>>#ajaxPut:data: to point to 127.0.0.1:4000

The problem comes when I actually do the PUT I get an error that says I need to set the Access-Control-Allow-Origin header in the response.

How can I recompile the server.js file to reflect changes I make in FileServer.st?


Thanks

Paul