Merge branch 'develop' into i/6282/adjust-clog

This commit is contained in:
Josh Lehman 2023-02-13 06:41:00 -08:00 committed by GitHub
commit 367eae9b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 12 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2035ef65290065edbd99a86f9f5a36978617bc1983131fa474a9a5c0e91dc15d
size 5998440
oid sha256:544744b6d1360692b83be7f3e505d0710ea6ce541912509601e81fec2a2cea2e
size 5992253

View File

@ -1554,6 +1554,9 @@
:: gall scry endpoint
::
[%scry ~]
:: respond with the @p the requester is authenticated as
::
[%name ~]
:: respond with the default file not found page
::
[%four-oh-four ~]

View File

@ -70,7 +70,7 @@
++ axle
$: :: date: date at which http-server's state was updated to this data structure
::
date=%~2020.10.18
date=%~2022.7.26
:: server-state: state of inbound requests
::
=server-state
@ -744,11 +744,32 @@
::
%scry
(handle-scry authenticated address request(url suburl))
::
%name
(handle-name authenticated request)
::
%four-oh-four
%^ return-static-data-on-duct 404 'text/html'
(error-page 404 authenticated url.request ~)
==
:: +handle-name: respond with our @p or 403
::
++ handle-name
|= [authenticated=? =request:http]
|^ ^- (quip move server-state)
?. authenticated
(error-response 403 ~)
?. =(%'GET' method.request)
(error-response 405 "may only GET name")
%^ return-static-data-on-duct 200 'text/plain'
(as-octs:mimes:html (scot %p our))
::
++ error-response
|= [status=@ud =tape]
^- (quip move server-state)
%^ return-static-data-on-duct status 'text/html'
(error-page status authenticated url.request tape)
--
:: +handle-scry: respond with scry result, 404 or 500
::
++ handle-scry
@ -848,7 +869,7 @@
%leave ~
==
::
?(%authentication %logout)
?(%authentication %logout %name)
[~ state]
::
%channel
@ -1071,7 +1092,7 @@
^- @t
%- crip
=; max-age=tape
"urbauth-{(scow %p our)}={(scow %uv session)}; Path=/; Max-Age={max-age}"
"urbauth-{(scow %p our)}={(scow %uv session)}; Path=/; Max-Age={max-age}; HttpOnly"
%- format-ud-as-integer
?. extend 0
(div (msec:milly session-timeout) 1.000)
@ -2207,6 +2228,7 @@
[[~ /~/logout] duct [%logout ~]]
[[~ /~/channel] duct [%channel ~]]
[[~ /~/scry] duct [%scry ~]]
[[~ /~/name] duct [%name ~]]
==
[~ http-server-gate]
:: %trim: in response to memory pressure
@ -2577,15 +2599,36 @@
:: +load: migrate old state to new state (called on vane reload)
::
++ load
|= old=axle
=> |%
++ axle-old
%+ cork
axle
|= =axle
axle(date %~2020.10.18)
--
|= old=$%(axle axle-old)
^+ ..^$
:: enable https redirects if certificate configured
::
=. redirect.http-config.server-state.old
?& ?=(^ secure.ports.server-state.old)
?=(^ secure.http-config.server-state.old)
?- -.old
%~2020.10.18
%= $
date.old %~2022.7.26
::
bindings.server-state.old
%+ insert-binding
[[~ /~/name] outgoing-duct.server-state.old [%name ~]]
bindings.server-state.old
==
..^$(ax old)
::
%~2022.7.26
:: enable https redirects if certificate configured
::
=. redirect.http-config.server-state.old
?& ?=(^ secure.ports.server-state.old)
?=(^ secure.http-config.server-state.old)
==
..^$(ax old)
==
:: +stay: produce current state
::
++ stay `axle`ax

View File

@ -2347,5 +2347,5 @@
::
++ cookie-string
%^ cat 3 cookie-value
'; Path=/; Max-Age=604800'
'; Path=/; Max-Age=604800; HttpOnly'
--