From 0f8b78c0b7e2aca94a14b36af020d0f7d8301cc5 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 5 Apr 2021 00:50:35 +0200 Subject: add simple server which takes POST requests The idea is that it can accept surveys sent to it. Note that in an actual deployment it should have at least some rate-limiting, since actual validation of input is impossible if they are encrypted – i.e. this is bascially a pastbin. It may, however, be possible to require signing answers for survey with access restrictions, or do a challange/response type thing before allowing submission. --- server/Readme.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 server/Readme.org (limited to 'server/Readme.org') diff --git a/server/Readme.org b/server/Readme.org new file mode 100644 index 0000000..1242159 --- /dev/null +++ b/server/Readme.org @@ -0,0 +1,14 @@ +#+TITLE: Simple Server that accepts survey answers + +Run with: +#+BEGIN_SRC +guile server.scm +#+END_SRC + +Will listen to localhost:8080, and accept files sent via POST with +mimetypes of either ~text/plain~ (which will be appended to a single +file in the working directory) or ~text/age~ (which will be kept as a +single file). + +Expects a custom header ~X-Survey~ in these requests to know which survey +the answer belongs to. -- cgit v1.2.3