microsoft / microsoft/aspire

Make it possible to run the dashboard behind a reverse proxy or load balancer

Open
#5,134 28 comments 13 reactions 0 assignees View on GitHub
area-dashboard
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I would like to be able to host Aspire Dashboard behind a reverse proxy such as NGINX. Unfortunately, Aspire Dashboard doesn't take `X-Forwarded-*` headers into consideration, and doesn't allow to configure a path base.

As an example, assume Aspire Dashboard is accessible internally from http://aspire-dashboard-service:18888/ and externally from https://example.com/dev/aspire-dashboard/ through a reverse proxy.

The issue of the path base has already been described in #4528 and #4159. Additionally, authentication through OpenID Connect fails to set the correct value for `redirect_uri`, as it uses the internal schema (HTTP) rather than the external one (HTTPS).

### Describe the solution you'd like

It's possible to add support for reverse proxies and load balancers as described here:
https://learn.microsoft.com/aspnet/core/host-and-deploy/proxy-load-balancer

Ideally, all the featured described in previous page (except for certificate forwarding) should be configurable by the user, namely:
- Forwarded headers from the reverse proxy or load balancer
- Header names, known proxies and forward limit
- Forcing the assumption that external address is always HTTPS (necessary when the reverse proxy does not support `X-Forwarded-*` headers)
- Path base

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.