git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[gitweb] Problem with html base tag

From
Ddabicho <tsukebumi@gmail.com>
Date
Apr 27, 2021, 20:50 UTC
Message-ID
<CAO8+z-buoW2yMJS4JNq_68yForgZm+D+hY_9qNkk-ii6Uwkc0Q@mail.gmail.com>

For some reason browsers were not loading static resources (js, css, favicon) until I appended a slash to the base ref in gitweb.cgi.

Not sure if it is a bug or something changed on my side after a system upgrade, or some change in some dependency.

I attached the change.

--- gw/gitweb.cgi 2021-04-27 16:06:23.054063915 -0500 +++ gitweb/gitweb.cgi 2021-04-27 15:59:02.060725146 -0500

@@ -4215,7 +4215,7 @@
 	# the stylesheet, favicon etc urls won't work correctly with path_info
 	# unless we set the appropriate base URL
 	if ($ENV{'PATH_INFO'}) {
-		print "<base href=\"".esc_url($base_url)."\" />\n";
+		print "<base href=\"".esc_url($base_url)."/\" />\n";
 	}
 	print_header_links($status);
 
Message 1 of 1 in “[gitweb] Problem with html base tag”
  1. dabichoApr 27, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.