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