English 中文(简体)
Allowing "Cross-Site" calls between local ports
原标题:

I m working on a Google Web Toolkit driven site that communicates via AJAX to a WCF server. Once deployed the GWT code will run in the same domain as the WCF service but when developing/debugging locally they both run as separate processes and therefore on separate ports. This causes my browser to assume that I m making a cross site call and promptly blocks any server/client communication. As you can imagine, this doesn t make debugging a happy affair.

Anything I can do to convince my browser that it s okay to let localhost:1234 talk to localhost:5678?

(Focusing primarily on Chrome and Firefox, BTW)

最佳回答

So after a few days of suffering through development in IE, I finally found a very workable solution for this. I m now running a HTTP Proxy servlet (one of the ones from this post) that catches any of my server-bound requests and forwards them to the right port.

Since it s a servlet it s easily distributable through our source control system, launches automatically when debugging, and doesn t get thrown in with the resulting Javascript when compiling! Almost a perfect solution! The only thing that could make it better is if Google packaged one with GWT. hint hint

问题回答

暂无回答




相关问题
JavaScript Code injected into my website pages

I need to know if there is any way of writing additional code to JavaScript files already deployed on the server. I am facing a problem with an ASP.NET 2.0 website and it is related to the ...

Security in a Rails app - User submitted data

I m currently in the process of writing my first Rails app. I m writing a simple blog app that will allow users to comment on posts. I m pretty new to Rails, so I m looking for a bit of guidance on ...

XSS on jsbin.com

Anyone know if jsbin.com implements any protection for XSS or other javascript attacks? I see jsbin links used fairly regularly on sites like this one and I can t find any indication from the site ...

ASP.NET: Looking for solution to solve XSS

We got a long-running website where XSS lurks. The problem comes from that some developers directly - without using HtmlEncode/Decode() - retrieve Request["sth"] to do the process, putting on the web. ...

热门标签