faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
alexherbo2 has quit [Ping timeout: 272 seconds]
_whitelogger has joined #amber
alexherbo2 has joined #amber
_whitelogger has joined #amber
<FromGitter> <eliasjpr> @andrewc910 with a PIPE (Http::Handler) you can look at the request object and parse the domain from the host or headers
<FromGitter> <eliasjpr> to get the subdomain
<FromGitter> <eliasjpr> from within the pipe you can then add a request variable that holds the subdomain or load setting etc
<FromGitter> <andrewc910> @eliasjpr From there, how do you check if a certain route exists? If the router doesn't register what routes are apart of what subdomain, how do you verify `api.host.com/my_route` exists and its not actually `host.com/my_route`?
<FromGitter> <eliasjpr> Look at the remote address or one of the http headers such as referer or forwarded for
<FromGitter> <eliasjpr> Those headers contain domain information for the request.
alexherbo27 has joined #amber
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo2 has joined #amber
alexherbo27 has quit [Ping timeout: 256 seconds]
alexherbo2 has quit [Ping timeout: 272 seconds]
alexherbo2 has joined #amber
alexherbo21 has joined #amber
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo21 is now known as alexherbo2
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
<FromGitter> <damianham> @andrewc910 just out of interest and given the low cost of hosting amber projects why would you not create a new amber project for the subdomain if the routes are different and use nginx server definitions to proxy to the different amber instances ?
<FromGitter> <andrewc910> @eliasjpr Thank you! I will give this a try. Much appreciated. ⏎ ⏎ @damianham Because I prefer monoliths. It's a stupid simple reason, I know. I don't enjoy spinning up server, configuring nginx, monitoring, etc. And i only want a subdomain for organizational reasons. No real technical reason. If i can get subdomains to work, cool, if not its not really a big deal. ⏎ ⏎ I think I am going to try and make
<FromGitter> ... that pipe just to learn a bit more about the piping system but if it becomes more than a few hours of work, id drop it because it's really not a big deal. [https://gitter.im/amberframework/amber?at=5f9c5ad3b4283c208a356466]