Skip to content

WithReference to project and host.docker.internal #7579

Answered by dashkan
dashkan asked this question in Q&A
Discussion options

You must be logged in to vote

Never mind. I figured it out.

    public static IResourceBuilder<OAuth2ProxyResource> WithUpstreamProject(
        this IResourceBuilder<OAuth2ProxyResource> builder,
        IResourceBuilder<ProjectResource> project,
        string endpointName = "http",
        string path = "/")
    {
        builder.WithReference(project)
            .WithEnvironment(context =>
            {
                if (context.EnvironmentVariables.GetValueOrDefault("OAUTH2_PROXY_UPSTREAMS") is ReferenceExpression oauth2ProxyUpstreams)
                {
                    context.EnvironmentVariables["OAUTH2_PROXY_UPSTREAMS"] = ReferenceExpression.Create($"{oauth2ProxyUpstreams},{project.Resource.GetEndpoint(e…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dashkan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant