directory listing: Send viewport meta tag master
authordecho <deltaecho255@protonmail.com>
Sun, 3 Jan 2021 15:48:10 +0000 (21:48 +0600)
committerEmil Mikulic <emikulic@gmail.com>
Tue, 5 Jan 2021 08:31:16 +0000 (19:31 +1100)
darkhttpd.c

index f6b26b0..e15d8de 100644 (file)
@@ -1865,7 +1865,10 @@ static void generate_dir_listing(struct connection *conn, const char *path) {
     listing = make_apbuf();
     append(listing, "<html>\n<head>\n <title>");
     append(listing, conn->url);
-    append(listing, "</title>\n</head>\n<body>\n<h1>");
+    append(listing,
+            "</title>\n"
+            "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n"
+            "</head>\n<body>\n<h1>");
     append(listing, conn->url);
     append(listing, "</h1>\n<tt><pre>\n");