DWR cross subdomain

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

DWR cross subdomain

Neufeld, Scott
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: DWR cross subdomain

david@butterdev.com
The only way to make a cross-domain request via POST (that I know of) is
to use CORS which we do not currently support out of the box.  You may
be able to implement (or find an existing) servlet filter that provides
CORS capability.  Then the issue would be that DWR's engine.js would
still try to use script-tag remoting to fulfill the request (GET).  I am
not sure if this could be overridden without hacking engine.js a bit.  I
have created https://directwebremoting.atlassian.net/browse/DWR-633 to
investigate this.  Let us know if you find a work-around.

-David

On 2015-03-27 07:43, Neufeld, Scott wrote:

> We are using DWR (3.0RC2) on a Tomcat 7 server "services.abc.com". It
> is configured for crossDomainSessionSecurity (false), jsonpEnabled
> (true), allowScriptTagRemoting (true),
> allowGetForSafariButMakeForgeryEasier (true).
>
> We then make a call from a page served by "apps.abc.com".
>
> The first call has a parameter that is relatively small - maybe 40
> characters. The standard DWR call returns values as expected.
>
> A second call to the same remote method has a much larger parameter
> value - a few thousand characters, perhaps. The same DWR call returns
> an error "Incomplete Reply from Server".
>
> Calling the same DWR remote method via JQuery post returns the values
> when the large parameter value is passed.
>
> Note also that the same DWR calls made from the same server
> (services.abc.com) work as expected with the large parameter value.
>
> Speculation on my part -- It appears as though DWR is using GET to
> process the cross-subdomain request. Is there a way to configure DWR
> to process this request normally, as it is on the same domain?
>
> Thanks for your help.