/cgi-bin but it's JavaScript executed by Kiesel!
https://linus.dev/posts/kiesel-devlog-8/
| views | Initial commit | |
| .gitignore | Initial commit | |
| config.sh | Initial commit | |
| LICENSE | Initial commit | |
| README.md | Initial commit | |
| routes.sh | Initial commit | |
Kiesel CGI
/cgi-binbut it's JavaScript executed by Kiesel!
Installation
- Download HTTP.sh
- Clone this repository into
appunder HTTP.sh - Add some JS files under
app/cgi-bin/ ./http.sh
CGI Metadata
An object of the following type is added to te start of each script:
declare const CGI: {
vars: {
AUTH_TYPE: string;
CONTENT_LENGTH?: string;
CONTENT_TYPE?: string;
GATEWAY_INTERFACE: "CGI/1.1";
PATH_INFO: "";
REMOTE_ADDR: string,
REMOTE_HOST: null,
REQUEST_METHOD: "GET" | "POST";
SCRIPT_NAME: string;
SERVER_NAME: string;
SERVER_PORT: number | null;
SERVER_PROTOCOL: "HTTP/1.0";
SERVER_SOFTWARE: string;
};
params: {
GET: Record<string, string>;
POST: Record<string, string>;
};
url: string;
userAgent: string;
};
Why?
Yes.