Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Trust and Identity Incubator
alternate-mdx
Commits
c055c72b
Commit
c055c72b
authored
Feb 21, 2022
by
Martin van Es
Browse files
Better terms for sign/request and cache
parent
e7f1dee5
Changes
2
Hide whitespace changes
Inline
Side-by-side
mdproxy.py
View file @
c055c72b
...
...
@@ -36,7 +36,7 @@ def serve(domain, eid):
cached
[
domain
]
=
cached
.
get
(
domain
,
{})
if
entityID
in
cached
[
domain
]:
if
cached
[
domain
][
entityID
].
expires
>
datetime
.
now
(
tz
.
tzutc
()):
print
(
f
"
serv
e
{
entityID
}
"
)
print
(
f
"
cach
e
{
entityID
}
"
)
return
cached
[
domain
][
entityID
].
md
print
(
f
"request
{
entityID
}
"
)
...
...
utils.py
View file @
c055c72b
...
...
@@ -140,6 +140,7 @@ class Resource:
if
sha1
in
self
.
__dict__
:
signed_entity
=
self
.
__dict__
[
sha1
]
if
signed_entity
.
expires
>
datetime
.
now
(
tz
.
tzutc
()):
print
(
f
"cache
{
sha1
}
"
)
data
=
self
.
__dict__
[
sha1
].
md
if
data
is
None
and
sha1
in
self
.
idps
:
...
...
@@ -162,5 +163,4 @@ class Resource:
print
(
sha1
)
print
(
f
"
{
e
}
"
)
print
(
f
"serve
{
sha1
}
"
)
return
data
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment