Handbook
Glossary
<check-form-submissions> ( responder -- responder' )
Furnace framework
ยป
Form submission referrer checking
Next:
referrer ( -- referrer/f )
Vocabulary
furnace
.
referrer
Inputs
responder
a responder
Outputs
responder'
a responder
Word description
Wraps the responder in a filter responder which ensures that form submissions originate from a page on the same server. Any submissions which do not are sent back with a 403 error.
Definition
USING:
furnace.utilities
http.server
kernel
;
IN:
furnace.referrer
:
<check-form-submissions>
( responder -- responder' )
[
post-request?
[
same-host?
]
[
drop
t
]
if
]
<referrer-check>
;