Closed sesigl closed 6 years ago
The urls for delivery and preview API are set in the QueryService class as private readonly
attributs.
What about exposing them in the DeliveryClientConfig class? QueryService is already instantiated with the config object.
Sounds Good for me. Looking forward to an implementation and documentation ;).
See how it's implemented in the .net sdk for reference.
alright, so what do you mean by that? Do you ask me to contribute ? Or will you do/delegate it?
I'm open minded in this case :).
@Journerist sorry for confusion, it was rather a generic remark, not addressed to anyone in particular :)
It would be great if you could take care of it.
So what we did in the .NET SDK is that we introduced a DeliveryOptions
object, adjusted DeliveryClient's constructors. And here's an example of how it can be used: https://github.com/Kentico/delivery-sdk-net/wiki/Using-the-ASP.NET-Core-Configuration-API-and-DI-to-Instantiate-the-DeliveryClient.
I'm not saying we should do it the exactly same thing but the general look&feel should be somewhat similar :)
Please let us know if you're willing to contribute so that we can assign the issue to you.
Hey guys,
This is a good idea. I implemented it so that you can specify base urls when instantiating DeliveryClientConfig
. I published it in 2.1.2
release:
new DeliveryClientConfig('projectId', [], {
baseUrl: 'http://customurl.com',
basePreviewUrl: 'http://custompreview.com'
});
Let me know how that works and if you have any further suggestions.
@Enngage thank you, this is awesome. I'll try it this evening and give you feedback if this works for me.
I already love it, works amazingly. Finally I can get rid of my ugly hack :P. Thanks a lot ! <3
Hi,
is there a way to set the base url for accessing kentico cloud? I would like to proxy all calls to protect sensitive data. Is there are global config parameter available?
If not can you please add a configuration?
Instead of calling: https://preview-deliver.kenticocloud.com/{key}/items?system.type=article
it should call: https://{custom url}/items?system.type=article
when set.