mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
helm: add cors registry management generators
This commit is contained in:
parent
1c14e8854f
commit
7242947f95
6
pkg/arvo/gen/cors-registry.hoon
Normal file
6
pkg/arvo/gen/cors-registry.hoon
Normal file
@ -0,0 +1,6 @@
|
||||
:: eyre: give cors configuration
|
||||
::
|
||||
:- %say
|
||||
|= [[now=@da eny=@uvJ =beak] ~ ~]
|
||||
:- %noun
|
||||
.^(cors-registry:eyre %ex /(scot %p p.beak)//(scot %da now)/cors)
|
5
pkg/arvo/gen/hood/cors-approve.hoon
Normal file
5
pkg/arvo/gen/hood/cors-approve.hoon
Normal file
@ -0,0 +1,5 @@
|
||||
:: eyre: allow cors requests from origin
|
||||
::
|
||||
:- %say
|
||||
|= [^ [=origin:eyre ~] ~]
|
||||
[%helm-cors-approve origin]
|
5
pkg/arvo/gen/hood/cors-reject.hoon
Normal file
5
pkg/arvo/gen/hood/cors-reject.hoon
Normal file
@ -0,0 +1,5 @@
|
||||
:: eyre: disallow cors requests from origin
|
||||
::
|
||||
:- %say
|
||||
|= [^ [=origin:eyre ~] ~]
|
||||
[%helm-cors-reject origin]
|
@ -204,6 +204,16 @@
|
||||
|= [=binding:eyre =generator:eyre] =< abet
|
||||
(emit %pass /helm/serv %arvo %e %serve binding generator)
|
||||
::
|
||||
++ poke-cors-approve
|
||||
|= =origin:eyre
|
||||
=< abet
|
||||
(emit %pass /helm/cors/approve %arvo %e %approve-origin origin)
|
||||
::
|
||||
++ poke-cors-reject
|
||||
|= =origin:eyre
|
||||
=< abet
|
||||
(emit %pass /helm/cors/reject %arvo %e %reject-origin origin)
|
||||
::
|
||||
++ poke
|
||||
|= [=mark =vase]
|
||||
?+ mark ~|([%poke-helm-bad-mark mark] !!)
|
||||
@ -213,6 +223,8 @@
|
||||
%helm-atom =;(f (f !<(_+<.f vase)) poke-atom)
|
||||
%helm-automass =;(f (f !<(_+<.f vase)) poke-automass)
|
||||
%helm-cancel-automass =;(f (f !<(_+<.f vase)) poke-cancel-automass)
|
||||
%helm-cors-approve =;(f (f !<(_+<.f vase)) poke-cors-approve)
|
||||
%helm-cors-reject =;(f (f !<(_+<.f vase)) poke-cors-reject)
|
||||
%helm-hi =;(f (f !<(_+<.f vase)) poke-hi)
|
||||
%helm-knob =;(f (f !<(_+<.f vase)) poke-knob)
|
||||
%helm-mass =;(f (f !<(_+<.f vase)) poke-mass)
|
||||
|
Loading…
Reference in New Issue
Block a user