X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/b115955d71c50cd2d0065c45f3df6b02fa4730bd..694dd43886f23723f415aed3afb62131cdbcaa51:/ui-shared.c?ds=inline diff --git a/ui-shared.c b/ui-shared.c index de77bbf..5ce2bc5 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -34,6 +34,17 @@ void cgit_print_error(char *msg) html("\n"); } +char *cgit_httpscheme() +{ + char *https; + + https = getenv("HTTPS"); + if (https != NULL && strcmp(https, "on") == 0) + return "https://"; + else + return "http://"; +} + char *cgit_hosturl() { char *host, *port; @@ -492,7 +503,8 @@ void cgit_print_docstart(struct cgit_context *ctx) html("'/>\n"); } if (host && ctx->repo) { - html("