veliovgroup / jazeee-meteor-spiderable

Fork of Meteor Spiderable with longer timeout, caching, better server handling
https://atmospherejs.com/jazeee/spiderable-longer-timeout
33 stars 9 forks source link

Multitenant and subdomains : Use request header hostname instead of Meteor.absoluteUrl() #36

Closed Alexander-Urbina closed 7 years ago

Alexander-Urbina commented 8 years ago

Hi, Nice package, it was the only one working for me, I've tried with an app that has subdomains and it returns the same page with ?_escaped_fragment_= in all of the subdomains. I'm not sure, but it seems related to use Meteor.absoluteUrl() insted of req.headers.host. I've reviewed the collection for SpiderableCacheCollection and it takes only the Meteor.absoluteUrl() Would you consider make changes like this ?

jazeee commented 8 years ago

Assuming it works, I think this would be a reasonable change. We'd change it here: https://github.com/jazeee/jazeee-meteor-spiderable/blob/master/lib/server.coffee#L110

jazeee commented 8 years ago

Note that the last comment on this link indicates that it isn't a great solution.: http://stackoverflow.com/questions/10348906/how-to-know-if-a-request-is-http-or-https-in-node-js

Quoted:

Note that this will only work if your app is running behind a reverse proxy that sets this header

jazeee commented 8 years ago

I am unsure what is the right solution here, so will need to investigate further. Node url module probably will help.

dr-dimitru commented 7 years ago

Closed due to silence at issue owner end. Feel free to reopen it in case if the issue still persists on your end.