Feat: Make it possible to override the index document
-
Hi,
currently surfer has the ability to serve either
index.html
oderindex.htm
as its default file visiting the domain where surfer is installed.What we want to do is to provide an install script (which should be served as
text/plain
or maybe ratherapplication/x-shellscript
) on one of my Cloudron domains so users can simply do a:wget https://setup.domain.com bash index.sh
edit: the file should be displayed in plain so
application/x-shellscript
would not be the desired behaviour actually. -
@fbartels I do wonder if serving up any
index.*
with giving htm(l) precendence would be fine. It might be a bit magic, but I generally like to keep config options for surfer only where really necessary.But yes otherwise I guess a simple config just containing the wanted index filename can also be added easily.
-
Hi @nebulon,
that sounds like a nice and simple solution.
Primarily we want that users see the contents of the script when navigating to https://setup.domain.com, so with the above tweak we can just store the script as index.txt and instruct them to do
curl https://setup.domain.com > script.sh
.So that would be covered by your solution.