-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local deployment on par with future prod #306
Conversation
services.Configure<ForwardedHeadersOptions>(options => | ||
{ | ||
options.ForwardedHeaders = | ||
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be moved to appconfig.json smth like a 'ProxyConfig' section ?
/// </summary> | ||
public static IApplicationBuilder UseProxy(this IApplicationBuilder app, IConfiguration configuration) | ||
{ | ||
string basePath = configuration["REVERSE_PROXY_BASEPATH"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move REVERSE_PROXY_BASEPATH
into the public constant of the configuration section ?
@@ -17,6 +17,8 @@ namespace OutOfSchool.IdentityServer | |||
{ | |||
public class Program | |||
{ | |||
private static readonly int CHECK_CONNECTIVITY_DELAY = 5000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use const
instead of static readonly
here.
Console.WriteLine("Waiting for db connection"); | ||
Task.Delay(CHECK_CONNECTIVITY_DELAY).Wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Console.WriteLine("Waiting for db connection");
looks like logger.Trace
Also, should we add a timeout or cancellation for the wait mechanism ?
@@ -0,0 +1,36 @@ | |||
{ | |||
"ConnectionStrings": { | |||
"DefaultConnection": "Server=sql-server; Database=Master;User Id=SA;Password=Oos-password1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we are using internal main MSSQL database (Database=Master
) for our project ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update this in next PR.
{ | ||
string swaggerEndpoint; | ||
|
||
string basePath = configuration["REVERSE_PROXY_BASEPATH"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen REVERSE_PROXY_BASEPATH
before, please move to const
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.6.3" /> | ||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" /> | ||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.6.3" /> | ||
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.1.3" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a document with all third party libraries we are using ?
e.g. output of the Get-Package | select Id, Version, LicenseUrl
running from vs console
{ | ||
[ApiController] | ||
[ApiVersion("1.0")] | ||
[Route("api/v{version:apiVersion}/[controller]/[action]")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing each and every Controller couldn't routing be configured via Conventional routing ? (In Startup.Configure
)
@@ -107,7 +109,7 @@ public async Task<IActionResult> GetByFilter([FromQuery] WorkshopFilter filter) | |||
{ | |||
if (string.IsNullOrWhiteSpace(filter.City)) | |||
{ | |||
filter.City = "���"; | |||
filter.City = "Київ"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Київ" - should be Default_City
constant introduced somewhere, but not in WorkshopController
ea5efb0
to
d39e05f
Compare
SonarCloud Quality Gate failed. |
Disclaimer
Lots of changes, but more than half of them are due to moving files from one namespace to another.
This is a first set of changes. Rest will mostly include changes to compose files & nginx config.
Contents
appsettings
& some env variables.work
means it doesn't ~50% of time, depending on Win10 build :) )