Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to specify a dynamic base_url #393

Open
mozcomp opened this issue Oct 28, 2021 · 2 comments
Open

Is it possible to specify a dynamic base_url #393

mozcomp opened this issue Oct 28, 2021 · 2 comments

Comments

@mozcomp
Copy link

mozcomp commented Oct 28, 2021

We have a multi-domain app, where the base_url will change in line with the url for the request.
How best to specify the base-url for the resources?
Is there an option to specify a Proc?

@mozcomp mozcomp closed this as completed Oct 28, 2021
@mozcomp
Copy link
Author

mozcomp commented Oct 28, 2021

Realised I can set it easily in a controller before_action

@mozcomp mozcomp reopened this Oct 28, 2021
@mozcomp
Copy link
Author

mozcomp commented Oct 28, 2021

the issue seems to be with linked resources, you can set the base_url in the controller for the primary resource, but the linked resources retain the base_url of the domain at the time they were initialised.

Ideally it would be something like configuring a global base_url using a Proc

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

No branches or pull requests

1 participant