added allow urls to use
This commit is contained in:
parent
c7b1f28c92
commit
efb1f344e0
@ -17,6 +17,15 @@ Log.Logger = new LoggerConfiguration()
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
var urls = builder.Configuration.GetRequiredSection("Urls");
|
||||
|
||||
if (!string.IsNullOrEmpty(urls.Value))
|
||||
{
|
||||
var allowedUrlsToUse = urls.Value.Split(',');
|
||||
|
||||
builder.WebHost.UseUrls(allowedUrlsToUse);
|
||||
}
|
||||
|
||||
builder.Host.UseSerilog();
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
@ -10,5 +10,6 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"XApiKey": "c6eAXYcNT873TT7BfMgQyS4ii7hxa53TLEUN7pAGaaU="
|
||||
"XApiKey": "c6eAXYcNT873TT7BfMgQyS4ii7hxa53TLEUN7pAGaaU=",
|
||||
"Urls": "http://localhost:5000"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user