Skip to content

vhost compatibility#3

Open
max-mapper wants to merge 7 commits intodaleharvey:masterfrom
max-mapper:master
Open

vhost compatibility#3
max-mapper wants to merge 7 commits intodaleharvey:masterfrom
max-mapper:master

Conversation

@max-mapper
Copy link
Contributor

i'm pretty sure I updated all of the urls to be vhost friendly. basically there is a couch.root() method that will return the url for the _rewrite handler in both vhost and non vhost mode

you will need secure_rewrites to be set to false in your config

@max-mapper
Copy link
Contributor Author

the 'launch couchapp' function is kinda crazy to think about... if you are inside a vhost you can't autodetect the real couch base url, just the proxy through rewrites (_rewrite/couch). that means that if you are editing a couchapp that also is vhost compatible then the url won't parse correctly:

generated url: http://myvhost:5984/couch/catmapper/_design/catmapper/_rewrite

what catmapper expects: http://localhost:5984/catmapper/_design/catmapper/_rewrite

tl;dr the extra "/couch" messes up the vhost url parser code

@daleharvey
Copy link
Owner

Yo max, this is awesome cheers

Is there a way to make this gracefully degrade on servers with secure_rewrites = true? as thats the default configuration I would prefer not to have it broken for everyone using a standard vanilla couch (including myself)

preferably it would work without having to go through _rewrites at all inside a vanilla configuration, but I dont know enough about rewrites to say whether it is possible, I will do a bit of digging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants