mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-18 20:31:40 +03:00
Merge branch 'develop' into i/6282/adjust-clog
This commit is contained in:
commit
367eae9b42
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:2035ef65290065edbd99a86f9f5a36978617bc1983131fa474a9a5c0e91dc15d
|
oid sha256:544744b6d1360692b83be7f3e505d0710ea6ce541912509601e81fec2a2cea2e
|
||||||
size 5998440
|
size 5992253
|
||||||
|
@ -1554,6 +1554,9 @@
|
|||||||
:: gall scry endpoint
|
:: gall scry endpoint
|
||||||
::
|
::
|
||||||
[%scry ~]
|
[%scry ~]
|
||||||
|
:: respond with the @p the requester is authenticated as
|
||||||
|
::
|
||||||
|
[%name ~]
|
||||||
:: respond with the default file not found page
|
:: respond with the default file not found page
|
||||||
::
|
::
|
||||||
[%four-oh-four ~]
|
[%four-oh-four ~]
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
++ axle
|
++ axle
|
||||||
$: :: date: date at which http-server's state was updated to this data structure
|
$: :: 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: state of inbound requests
|
||||||
::
|
::
|
||||||
=server-state
|
=server-state
|
||||||
@ -744,11 +744,32 @@
|
|||||||
::
|
::
|
||||||
%scry
|
%scry
|
||||||
(handle-scry authenticated address request(url suburl))
|
(handle-scry authenticated address request(url suburl))
|
||||||
|
::
|
||||||
|
%name
|
||||||
|
(handle-name authenticated request)
|
||||||
::
|
::
|
||||||
%four-oh-four
|
%four-oh-four
|
||||||
%^ return-static-data-on-duct 404 'text/html'
|
%^ return-static-data-on-duct 404 'text/html'
|
||||||
(error-page 404 authenticated url.request ~)
|
(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: respond with scry result, 404 or 500
|
||||||
::
|
::
|
||||||
++ handle-scry
|
++ handle-scry
|
||||||
@ -848,7 +869,7 @@
|
|||||||
%leave ~
|
%leave ~
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
?(%authentication %logout)
|
?(%authentication %logout %name)
|
||||||
[~ state]
|
[~ state]
|
||||||
::
|
::
|
||||||
%channel
|
%channel
|
||||||
@ -1071,7 +1092,7 @@
|
|||||||
^- @t
|
^- @t
|
||||||
%- crip
|
%- crip
|
||||||
=; max-age=tape
|
=; 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
|
%- format-ud-as-integer
|
||||||
?. extend 0
|
?. extend 0
|
||||||
(div (msec:milly session-timeout) 1.000)
|
(div (msec:milly session-timeout) 1.000)
|
||||||
@ -2207,6 +2228,7 @@
|
|||||||
[[~ /~/logout] duct [%logout ~]]
|
[[~ /~/logout] duct [%logout ~]]
|
||||||
[[~ /~/channel] duct [%channel ~]]
|
[[~ /~/channel] duct [%channel ~]]
|
||||||
[[~ /~/scry] duct [%scry ~]]
|
[[~ /~/scry] duct [%scry ~]]
|
||||||
|
[[~ /~/name] duct [%name ~]]
|
||||||
==
|
==
|
||||||
[~ http-server-gate]
|
[~ http-server-gate]
|
||||||
:: %trim: in response to memory pressure
|
:: %trim: in response to memory pressure
|
||||||
@ -2577,15 +2599,36 @@
|
|||||||
:: +load: migrate old state to new state (called on vane reload)
|
:: +load: migrate old state to new state (called on vane reload)
|
||||||
::
|
::
|
||||||
++ load
|
++ 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
|
?- -.old
|
||||||
?& ?=(^ secure.ports.server-state.old)
|
%~2020.10.18
|
||||||
?=(^ secure.http-config.server-state.old)
|
%= $
|
||||||
|
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: produce current state
|
||||||
::
|
::
|
||||||
++ stay `axle`ax
|
++ stay `axle`ax
|
||||||
|
@ -2347,5 +2347,5 @@
|
|||||||
::
|
::
|
||||||
++ cookie-string
|
++ cookie-string
|
||||||
%^ cat 3 cookie-value
|
%^ cat 3 cookie-value
|
||||||
'; Path=/; Max-Age=604800'
|
'; Path=/; Max-Age=604800; HttpOnly'
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user