Force https for OIDC behind proxy
This commit is contained in:
parent
431afa10f5
commit
e57057b5ee
1
publish.ps1
Normal file → Executable file
1
publish.ps1
Normal file → Executable file
|
@ -1,2 +1,3 @@
|
|||
#!/snap/bin/pwsh
|
||||
Set-Location src/MyPrayerJournal
|
||||
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained false
|
|
@ -125,6 +125,12 @@ module Configure =
|
|||
|> ctx.Response.Redirect
|
||||
ctx.HandleResponse ()
|
||||
|
||||
Task.CompletedTask
|
||||
opts.Events.OnRedirectToIdentityProvider <- fun ctx ->
|
||||
let bldr = UriBuilder ctx.ProtocolMessage.RedirectUri
|
||||
bldr.Scheme <- cfg["Scheme"]
|
||||
bldr.Port <- int cfg["Port"]
|
||||
ctx.ProtocolMessage.RedirectUri <- string bldr
|
||||
Task.CompletedTask
|
||||
)
|
||||
|> ignore
|
||||
|
@ -153,12 +159,7 @@ module Configure =
|
|||
.UseRouting()
|
||||
.UseAuthentication()
|
||||
.UseGiraffeErrorHandler(Handlers.Error.error)
|
||||
// .UseAuthorization()
|
||||
.UseEndpoints (fun e ->
|
||||
e.MapGiraffeEndpoints Handlers.routes
|
||||
// TODO: fallback to 404
|
||||
// e.MapFallbackToFile "index.html"
|
||||
|> ignore)
|
||||
.UseEndpoints (fun e -> e.MapGiraffeEndpoints Handlers.routes |> ignore)
|
||||
|> ignore
|
||||
app
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user