Hey all, having a weird issue when searching resou...
# avo-2
b
Hey all, having a weird issue when searching resources. The endpoint Avo tries to access when searching a resource is built like so: http://app.lvh.me:3000/http://my.app.lvh.me:3000/staff/avo_api/users/search?q=test&global=false Both app.lvh.me and my.app.lvh.me are valid domains locally as I have subdomains setup. Has anyone come across this? Is it some config I'm overlooking? I'm not sure how Avo is building the URL to be like so. The expected endpoint would be: http://app.lvh.me:3000/staff/avo_api/users/search?q=test&global=false And it works when I access it that way.
l
Hey Ricardo. Can you please open an issue on the repo with reproduceble steps please? Maybe also add the root_path setting from your initializer. Thanks!
b
Hey Adrian, I can but I'm not sure how to replicate this. My assumption is I have some config/env that is making this happen. I'll take a look at the source and see if I can figure anything out.
l
that's my assumption too. that definitely should not happen
b
Yeah... could you point me to where the URL for the search endpoint is generated?
l
hmm. I made it a personal rule not to give technical support on Discord
I hope you understand that
b
Sorry 😄
Yeah, I understand
l
Discord chats get burried and nobody finds them after
please open up a Github issue. that way everyone gets to see the process and how it was resolved
thank you!
b
Will do if I can't dig it up. Thanks
🙂
b
Had just found it 😄
Alright, I'll see if I can figure it out
Thanks again
l
anytime!
b
Found it @lemon-wall-20836 I have this in my rails environment files:
config.action_controller.default_url_options = { host: "my.app.lvh.me:3000" }
And that's forcing
window.Avo.configuration.root_path
to be
http://my.app.lvh.me:3000/staff
instead of
/staff
l
Got it! Good job debugging!
b
Had to be something
Thanks again. Idk if you plan on doing something about it but at least now I know what it is.
l
Gotcha!
Sounds good! Anytime!
4 Views