how are you binding to port 80? if you have nginx / apache then you can have a reverse proxy, couch also has an in build reverse proxy built in, I would suggest going down that route before dealing with cross domain issues, there are a lot of them
On 29 September 2011 17:45, Benoit Chesneau <[email protected]> wrote: > On Thu, Sep 29, 2011 at 6:42 PM, CGS <[email protected]> wrote: > > First of all, thank you Dale for your answer. Still, the problem is more > > complex than I anticipated. > > > > I am using YAWS as web server and it doesn't support proxy, so, I have to > > use two different ports for the two (CouchDB and YAWS). Methods I have > > tried: > > 1. $.ajax() - error: not allowed cross-domain data transfer via > JavaScript > > (both IP and port should match exactly for both origin and target), so, > even > > if correct authentication, no cookie. > > 2. form action pointing to > > server_name:5984/_session?next=/path_to_attachment/back.html - error: if > the > > authentication fails (incorrect username/password), the "next" is no > longer > > taken (back.html contains only window.location which redirects back to > > YAWS), but it goes back if the authentication doesn't fail. > > > > I would appreciate any idea related to how to solve any of these errors. > > Thank you. > > > > Cheers, > > CGS > > > > > can't you use the reverse proxy module of yaws ? Othere way would be > having an iframe. Waiting CORS (patch should be available on friday, > was busy). > > - benoit >
