graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

Is it possible to specify a dynamic base_url

Open mozcomp opened this issue 3 years ago • 2 comments

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 avatar Oct 28 '21 05:10 mozcomp

Realised I can set it easily in a controller before_action

mozcomp avatar Oct 28 '21 06:10 mozcomp

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

mozcomp avatar Oct 28 '21 09:10 mozcomp