[ prog / sol / mona ]

prog


How can I run my own instance of this

19 2019-11-26 02:53

Looking at the sources of these two pages:
https://textboard.org/prog/
https://textboard.org/prog/?css=2ch
It's clear that the main difference between them is that a different stylesheet has been requested, and that all internal links preserve the value of the css variable.
When testing this feature on my own instance, this feature doesn't work, and the hard-coded value of default.css in the main-template procedure is always requested.
I was considering changing main-template to take the css parameter as an additional argument, but that won't help with the internal links. Does anyone know how the internal links are modified on this site?

26 2020-02-17 06:00 *

>>19
This feature was intended to avoid any use of cookies and is actually a hack done in nginx.conf

Here's the relevant part.

        #replace css and add query string to all internal links
        subs_filter_bypass $bypass;
        subs_filter '<LINK href="/static/styles/(.*?).css"' '<LINK href="/static/styles/$arg_css.css"' or;
        subs_filter '<A href="((?!http).*?)(#.*?)?"' '<A href="$1$is_args$args$2"' gr;
        subs_filter '<FORM action="(.*?post)"' '<FORM action="$1$is_args$args"' gr;
301


VIP:

do not edit these