Merge pull request #6238 from urbit/i/6234/acme-handle-301-redirect

acme: handle https redirect in self-check
This commit is contained in:
fang 2023-01-25 12:59:45 +01:00 committed by GitHub
commit d40237feec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -584,10 +584,11 @@
~| [%no-next-domain idx=idx]
(head (skim pending |=([turf idx=@ud ?] =(idx ^idx))))
:: XX should confirm that :turf points to us
:: confirms that domain exists (and an urbit is on :80)
:: confirms that domain exists (and an urbit is on the standard port)
::
=/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow))
=/ =purl
:- [sec=| por=~ host=[%& turf.next]]
:- [sec=sec por=~ host=[%& turf.next]]
[[ext=~ path=/'~debug'] query=~]
=/ =wire
(acme-wire try %validate-domain /idx/(scot %ud idx.next))
@ -754,9 +755,8 @@
?> ?=(%wake sas.u.rod)
=* aut u.active.aut.u.rod
=/ pat=path /'.well-known'/acme-challenge/[tok.cal.aut]
:: note: requires port 80, just as the ACME service will
::
=/ url=purl [[sec=| por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~]
=/ sec=? p:.^(hart:eyre %e /(scot %p our.bow)/host/(scot %da now.bow))
=/ url=purl [[sec=sec por=~ hos=[%& dom.aut]] [ext=~ pat] hed=~]
:: =/ url=purl [[sec=| por=`8.081 hos=[%& /localhost]] [ext=~ pat] hed=~]
:: XX idx in wire?
::

View File

@ -36,7 +36,7 @@
;< ~ bind:m (backoff:strandio try ~h1)
;< rep=(unit httr:eyre) bind:m (hiss-request:strandio hiss)
?: ?& ?=(^ rep)
|(=(200 p.u.rep) =(307 p.u.rep))
|(=(200 p.u.rep) =(307 p.u.rep) =(301 p.u.rep))
==
(pure:m &)
?. ?| ?=(~ rep)