diff --git a/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Program.cs b/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Program.cs index 7636027..02b3513 100644 --- a/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Program.cs +++ b/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Program.cs @@ -134,9 +134,7 @@ void ConfigureServices(IServiceCollection services) }) .AddJwtBearer(options => { options.Authority = Environment.GetEnvironmentVariable("RINKUDESU_AUTHORITY"); -#if DEBUG - options.RequireHttpsMetadata = false; -#endif + options.RequireHttpsMetadata = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("RINKUDESU_AUTHORITY_ALLOW_HTTP")); options.Audience = "rinkudesu"; }); diff --git a/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Properties/launchSettings.json b/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Properties/launchSettings.json index 4b1a0a5..2726493 100644 --- a/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Properties/launchSettings.json +++ b/Rinkudesu.Services.Links/Rinkudesu.Services.Links/Properties/launchSettings.json @@ -10,6 +10,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "RINKUDESU_AUTHORITY": "http://localhost:8080/auth/realms/rinkudesu", + "RINKUDESU_AUTHORITY_ALLOW_HTTP": "1", "RINKU_LINKS_CONNECTIONSTRING": "Server=127.0.0.1;Port=5432;Database=rinku-links;User Id=postgres;Password=postgres;", "RINKU_KAFKA_ADDRESS": "localhost:9092", "RINKU_KAFKA_CLIENT_ID": "rinkudesu-links",