1
2
Fork
You've already forked cgi-bin
0
/cgi-bin but it's JavaScript executed by Kiesel! https://linus.dev/posts/kiesel-devlog-8/
Shell 100%
2024年05月19日 18:05:01 +01:00
views Initial commit 2024年05月19日 18:05:01 +01:00
.gitignore Initial commit 2024年05月19日 18:05:01 +01:00
config.sh Initial commit 2024年05月19日 18:05:01 +01:00
LICENSE Initial commit 2024年05月19日 18:05:01 +01:00
README.md Initial commit 2024年05月19日 18:05:01 +01:00
routes.sh Initial commit 2024年05月19日 18:05:01 +01:00

Kiesel CGI

/cgi-bin but it's JavaScript executed by Kiesel!

Installation

  • Download HTTP.sh
  • Clone this repository into app under 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.