How can I allow a session to be valid for all subdomains?
I have couchdb running on port 80 and I have some vhosts setup with
separate couchapps:
app1.domain.com = /app1/_design/app1/_rewrite
app2.domain.com = /app2/_design/app2/_rewrite
and my rewrite.json for each app looks like:
[{
"from": "",
"to": "login.html"
}]
If I require that a user needs to login to use an app by setting database
readers, then they need to post their user/pass to
app.domain.com/_sessionbut they can't access the rewrite and they
can't login from another
subdomain because their session won't be valid.
If I could make sessions valid across all subdomains of domain.com I could
do something like:
app1.domain.com = /app1/_design/app1/_rewrite
app2.domain.com = /app2/_design/app2/_rewrite
www.domain.com = /login/_design/login/login.html <-- handles login and
redirection to the correct app based on user roles or some other mapping
Maybe I am going about this the wrong way but I really do not want to use a
reverse proxy or another webserver or application layer for my couchapps.