add send cert reporting
This commit is contained in:
@@ -14,7 +14,7 @@ def openid_configuration():
|
||||
'revocation_endpoint': f'{ISSUER}/revoke',
|
||||
'userinfo_endpoint': f'{ISSUER}/userinfo',
|
||||
'jwks_uri': f'{ISSUER}/.well-known/jwks.json',
|
||||
'scopes_supported': OAUTH2_SCOPES_SUPPORTED.split(),
|
||||
'scopes_supported': OAUTH2_SCOPES_SUPPORTED,
|
||||
'response_types_supported': ['code'],
|
||||
'grant_types_supported': ['authorization_code', 'refresh_token'],
|
||||
'subject_types_supported': ['public'],
|
||||
|
||||
@@ -6,16 +6,16 @@ import { parse } from 'cookie'
|
||||
export async function loader({ request, context }: Route.LoaderArgs) {
|
||||
const cookies = parse(request.headers.get('Cookie') || '')
|
||||
const url = new URL(request.url)
|
||||
const redirect = new URL('/', url.origin)
|
||||
const loginUrl = new URL('/', url.origin)
|
||||
const issuerUrl = new URL('/authorize', context.cloudflare.env.ISSUER_URL)
|
||||
issuerUrl.search = url.search
|
||||
redirect.search = url.search
|
||||
loginUrl.search = url.search
|
||||
|
||||
if (!cookies?.__session) {
|
||||
return new Response(null, {
|
||||
status: httpStatus.FOUND,
|
||||
headers: {
|
||||
Location: redirect.toString()
|
||||
Location: loginUrl.toString()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -56,7 +56,7 @@ export async function loader({ request, context }: Route.LoaderArgs) {
|
||||
return new Response(null, {
|
||||
status: httpStatus.FOUND,
|
||||
headers: {
|
||||
Location: redirect.toString()
|
||||
Location: loginUrl.toString()
|
||||
}
|
||||
})
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user