mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-26 15:51:08 +08:00
chore: Change RequireHttpsMetadata for docker env
This commit is contained in:
parent
765912dc03
commit
5795ce328c
@ -52,6 +52,8 @@ services:
|
||||
#######################################################
|
||||
# EventStoreDB
|
||||
#######################################################
|
||||
#https://stackoverflow.com/questions/65272764/ports-are-not-available-listen-tcp-0-0-0-0-50070-bind-an-attempt-was-made-to
|
||||
|
||||
eventstore:
|
||||
container_name: eventstore
|
||||
image: eventstore/eventstore:21.2.0-buster-slim
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
using BuildingBlocks.Utils;
|
||||
using BuildingBlocks.Web;
|
||||
using Duende.IdentityServer.Models;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
@ -17,6 +16,7 @@ public static class JwtExtensions
|
||||
{
|
||||
options.Authority = jwtOptions.Authority;
|
||||
options.TokenValidationParameters.ValidateAudience = false;
|
||||
options.RequireHttpsMetadata = jwtOptions.RequireHttpsMetadata;
|
||||
});
|
||||
|
||||
if (!string.IsNullOrEmpty(jwtOptions.Audience))
|
||||
|
||||
@ -23,8 +23,9 @@
|
||||
"ConnectionString": "Server=postgres;Port=5432;Database=flight;User Id=postgres;Password=postgres;Include Error Detail=true"
|
||||
},
|
||||
"Jwt": {
|
||||
"Authority": "identity:5005",
|
||||
"Audience": "flight-api"
|
||||
"Authority": "http://myidentityserver.com",
|
||||
"Audience": "flight-api",
|
||||
"RequireHttpsMetadata": false
|
||||
},
|
||||
"RabbitMq": {
|
||||
"HostName": "rabbitmq",
|
||||
|
||||
@ -30,7 +30,8 @@
|
||||
},
|
||||
"Jwt": {
|
||||
"Authority": "https://localhost:5005",
|
||||
"Audience": "flight-api"
|
||||
"Audience": "flight-api",
|
||||
"RequireHttpsMetadata": true
|
||||
},
|
||||
"RabbitMqOptions": {
|
||||
"HostName": "localhost",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user