Url which specifies the css document to include in all cgit pages.
Default value: "/cgit.css".
-embedded
++embedded::
+ Flag which, when set to "1", will make cgit generate a html fragment
+ suitable for embedding in other html pages. Default value: none. See
+ also: "noheader".
+
-enable-index-links
+enable-index-links::
Flag which, when set to "1", will make cgit generate extra links for
each repo in the repository index (specifically, to the "summary",
"commit" and "tree" pages). Default value: "0".
deprecated, and will not be honored starting with cgit-1.0. Default
value: "0".
-noheader
++noheader::
+ Flag which, when set to "1", will make cgit omit the standard header
+ on all pages. Default value: none. See also: "embedded".
+
-renamelimit
+renamelimit::
Maximum number of files to consider when detecting renames. The value
"-1" uses the compiletime value in git (for further info, look at
`man git-diff`). Default value: "-1".
void cgit_print_http_headers(struct cgit_context *ctx)
{
+ const char *method = getenv("REQUEST_METHOD");
+
+ if (ctx->cfg.embedded)
+ return;
+
+ if (ctx->page.status)
+ htmlf("Status: %d %s\n", ctx->page.status, ctx->page.statusmsg);
if (ctx->page.mimetype && ctx->page.charset)
htmlf("Content-Type: %s; charset=%s\n", ctx->page.mimetype,
ctx->page.charset);