mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
forward-ports http-config management to %rver
This commit is contained in:
parent
84bc3ad4a3
commit
592b51e590
@ -1319,7 +1319,6 @@
|
||||
$ogre `%c
|
||||
$perm `%c
|
||||
$rest `%b
|
||||
$rule `%e
|
||||
$serv `%e
|
||||
$snap `%j
|
||||
$them `%e
|
||||
@ -1332,6 +1331,7 @@
|
||||
$request `%l
|
||||
$serve `%r
|
||||
$connect `%r
|
||||
$rule `%r
|
||||
==
|
||||
--
|
||||
--
|
||||
|
@ -110,6 +110,15 @@
|
||||
:: channel-state: state managed by the +channel core
|
||||
::
|
||||
=channel-state
|
||||
:: domains: domain-names that resolve to us
|
||||
::
|
||||
domains=(set turf)
|
||||
:: http-config: our server configuration
|
||||
::
|
||||
=http-config
|
||||
:: ports: live servers
|
||||
::
|
||||
ports=[insecure=@ud secure=(unit @ud)]
|
||||
==
|
||||
:: +outstanding-connection: open http connections not fully complete:
|
||||
::
|
||||
@ -1705,7 +1714,7 @@
|
||||
;: weld
|
||||
:: hand back default configuration for now
|
||||
::
|
||||
[duct %give %set-config *http-config]~
|
||||
[duct %give %set-config http-config.server-state.ax]~
|
||||
::
|
||||
closed-connections
|
||||
==
|
||||
@ -1713,15 +1722,42 @@
|
||||
::
|
||||
=/ event-args [[our eny duct now scry-gate] server-state.ax]
|
||||
=/ server (per-server-event event-args)
|
||||
?- -.task
|
||||
::
|
||||
:: %live: notifies us of our running server config
|
||||
::
|
||||
:: [insecure-port=@ud secure-port=(unit @ud)]
|
||||
?- -.task
|
||||
:: %live: notifies us of the ports of our live http servers
|
||||
::
|
||||
%live
|
||||
~& [%todo-live task]
|
||||
=. ports.server-state.ax +.task
|
||||
[~ http-server-gate]
|
||||
:: %rule: updates our http configuration
|
||||
::
|
||||
%rule
|
||||
?- -.http-rule.task
|
||||
:: %cert: install tls certificate
|
||||
::
|
||||
%cert
|
||||
=* config http-config.server-state.ax
|
||||
?: =(secure.config cert.http-rule.task)
|
||||
[~ http-server-gate]
|
||||
=. secure.config cert.http-rule.task
|
||||
:_ http-server-gate
|
||||
[duct %give %set-config config]~
|
||||
:: %turf: add or remove domain name
|
||||
::
|
||||
%turf
|
||||
=* domains domains.server-state.ax
|
||||
=/ mod/(set turf)
|
||||
?: ?=(%put action.http-rule.task)
|
||||
(~(put in domains) turf.http-rule.task)
|
||||
(~(del in domains) turf.http-rule.task)
|
||||
?: =(domains mod)
|
||||
[~ http-server-gate]
|
||||
=. domains mod
|
||||
:_ http-server-gate
|
||||
=/ cmd
|
||||
[%acme %poke `cage`[%acme-order !>(mod)]]
|
||||
[duct %pass /acme/order %g %deal [our our] cmd]~
|
||||
==
|
||||
::
|
||||
%request
|
||||
=^ moves server-state.ax (request:server +.task)
|
||||
|
@ -928,10 +928,10 @@
|
||||
+= http-rule
|
||||
$% :: %cert: set or clear certificate and keypair
|
||||
::
|
||||
[%cert p=(unit [key=wain cert=wain])]
|
||||
[%cert cert=(unit [key=wain cert=wain])]
|
||||
:: %turf: add or remove established dns binding
|
||||
::
|
||||
[%turf p=?(%put %del) q=turf]
|
||||
[%turf action=?(%put %del) =turf]
|
||||
==
|
||||
++ httq :: raw http request
|
||||
$: p/meth :: method
|
||||
@ -2240,9 +2240,12 @@
|
||||
:: report upgrade
|
||||
::
|
||||
[%vega ~]
|
||||
:: set http ports (?)
|
||||
:: notifies us of the ports of our live http servers
|
||||
::
|
||||
[%live p=@ud q=(unit @ud)]
|
||||
[%live insecure=@ud secure=(unit @ud)]
|
||||
:: update http configuration
|
||||
::
|
||||
[%rule =http-rule:eyre]
|
||||
:: starts handling an inbound http request
|
||||
::
|
||||
[%request secure=? =address =request:http]
|
||||
|
Loading…
Reference in New Issue
Block a user