Skip to content

How to route static files based on host? #25809

Answered by Tratcher
Yuki-Nagato asked this question in General
Discussion options

You must be logged in to vote

You can do that with UseWhen.

app.UseWhen(context => context.Request.Host.Host.Equals("static-a.example.com", StringCompairison.OrdinalIgnoreCase), subApp => subApp.UseStaticFiles....);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Yuki-Nagato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants