Handbook
Glossary
if-secure ( quot -- response )
Furnace framework
»
Furnace redirection support
»
Secure redirection
Prev:
<secure-redirect> ( url -- response )
Next:
<secure-only> ( responder -- secure-only )
Vocabulary
furnace
.
redirection
Inputs
quot
a
quotation
Outputs
response
a
response
Word description
Runs a quotation if the current request was made over HTTPS, otherwise returns a redirect to have the client request the current page again via HTTPS.
Definition
USING:
accessors
combinators
http
http.server.responses
kernel
namespaces
urls
;
IN:
furnace.redirection
:
if-secure
( quot -- response )
{
{
[
secure-connection?
]
[
call
]
}
{
[
request
get
method>>
"POST"
=
]
[
drop
<400>
]
}
[
drop
url
get
<secure-redirect>
]
}
cond
;
inline