jgorset / facebook-messenger

Definitely the best way to make Bots on Facebook Messenger with Ruby
MIT License
962 stars 211 forks source link

Best way to capture the subdomain request? #246

Closed ryanwaits closed 5 years ago

ryanwaits commented 5 years ago

Hey guys - seriously great job here, been using for a few years now and has made my life much easier, so thank you!

I'm currently working on migrating my current Rails bot into multi-tenancy, but am having a bit of trouble wrapping my head around how to best implement that. I have a Rails API integration that I can either call out to via an Active Resource call or I can connect to my db with ActiveRecord - however I need to know where the requestor is coming from in order to know which client I am serving.

Any thoughts on a good solution here? My first thoughts were to access the subdomain on every request - but haven't been able to figure out how to best do that yet.

Appreciate the help!

jgorset commented 5 years ago

Hi @ryanwaits! Happy to hear that it's been helpful to you. :blush: I'm not sure I understand what you want to accomplish here, though -- can you explain the problem like I'm 5?

jgorset commented 5 years ago

I take it you found a way to fix this, so I'll close it. :slightly_smiling_face: