Created
May 3, 2021 19:29
-
-
Save JeepNL/48c98c00a47bdfd1df0282e596c2284b to your computer and use it in GitHub Desktop.
YARP appsettings.Development.json v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// | |
// LOGGING | |
// | |
"Logging": { | |
"LogLevel": { | |
"Default": "Information", | |
"Microsoft": "Information", | |
"Yarp": "Information", | |
"Microsoft.Hosting.Lifetime": "Information" | |
} | |
}, | |
// | |
// GENERAL | |
// | |
//"AllowedHosts": "production.localhost;beta.localhost", | |
"AllowedHosts": "*", | |
// | |
// HOSTS | |
// | |
//# C:\Windows\System32\drivers\etc\hosts | |
//# localhost name resolution is handled within DNS itself. | |
//127.0.0.1 localhost | |
//::1 localhost | |
//127.0.0.1 production.localhost | |
//::1 production.localhost | |
//127.0.0.1 beta.localhost | |
//::1 beta.localhost | |
// | |
// KESTREL | |
// | |
"Kestrel": { | |
"Endpoints": { | |
"Http": { | |
"Url": "http://[::]:10080", | |
"Protocols": "Http1AndHttp2" | |
}, | |
"HttpsSni": { | |
"Url": "https://[::]:10443", | |
"ClientCertificateMode": "NoCertificate", // #TODO What's this? | |
"SslProtocols": [ "Tls11", "Tls12", "Tls13" ], | |
"Certificate": { | |
"Path": "cert.pfx", | |
"Password": "<password>" | |
}, | |
"Sni": { | |
"production.localhost": { | |
// At least one subproperty needs to exist per SNI section or it | |
// cannot be discovered via IConfiguration | |
"Protocols": "Http1AndHttp2" | |
}, | |
"beta.localhost": { | |
"Protocols": "Http1AndHttp2" | |
} | |
} | |
} | |
} | |
}, | |
// | |
// YARP | |
// | |
"ReverseProxy": { | |
"Routes": { | |
"productionRoute": { | |
"ClusterId": "productionCluster", | |
"Match": { | |
"Hosts": [ "production.localhost" ] | |
} | |
}, | |
"betaRoute": { | |
"ClusterId": "betaCluster", | |
"Match": { | |
"Hosts": [ "beta.localhost" ] | |
} | |
} | |
}, | |
"Clusters": { | |
"productionCluster": { | |
"Destinations": { | |
"production": { | |
"Address": "https://localhost:5001" // port 5001 production | |
} | |
} | |
}, | |
"betaCluster": { | |
"Destinations": { | |
"beta": { | |
"Address": "https://localhost:5002" // port 5002 beta | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment