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

How to set base URL for remoting? #280

Closed
Zalarian opened this issue Nov 10, 2022 · 3 comments
Closed

How to set base URL for remoting? #280

Zalarian opened this issue Nov 10, 2022 · 3 comments

Comments

@Zalarian
Copy link

Hi, I was wondering if there was a way to set the base URL for a remoting service? I have a couple different backends I'd like to be able to share code with my frontend.

@Tarmil
Copy link
Member

Tarmil commented Nov 10, 2022

This is a use case I haven't tried TBH. You might have success setting a backend for all your remote calls using the following (untested) in your client project startup:

builder.Services.AddRemoting(builder.HostEnvironment, fun httpContext ->
    httpContext.BaseAddress <- System.Uri("https://your-backend")
) |> ignore

But there is currently no way to use different backends for different remote APIs. This would be a welcome contribution though!

@Zalarian
Copy link
Author

Sure I am working with someone and we came across this issue. I think we'd be happy to give it a shot. What's the process for contributing?

@Zalarian
Copy link
Author

I'm super happy to see this be finished. We took a crack at it and never came to a solution!

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

2 participants