If you are looking to setup a read only wiki, you can create a startup action tiddler with the tag $:/tags/StartupAction and having the tiddler field set accordingly
Note the use of prefix[http] instead of match[...]. This covers both âremote accessâ protocols (http: and https:), and defaults to editMode=âtrueâ for all other protocols.
Just in case, Iâd like to say This is a fake read only mode, user could still use HTTP api to update or delete tiddlers on your http server.
I see you try to prevent this by set readonly mode when match[http:], But it is easily hackable.
A real readonly mode can be achieved by setting a random password on server start, It will also hide all editing buttons, But also make it really not hackable read only.
@linonetwo, you are correct of course, it is fake read only mode. But our demographic, mainly members of the public, wonât realise it is fake as all edit buttons are hid by a style sheet, as I mentioned in an earlier posting.
The setting of read mode, in this case, allows me to hide specific edit buttons in the interface when our users, using a browser to access the server copy, access the content as well as hiding various $list outputs showing changes made over the past seven days, etc.
Editors will access a copy of the wiki on their computers.
The other nice thing about this is that if a determined and knowledgeable users bypasses read mode and edits tiddlers, the server copy remains un updated as the updated copy gets saved on their computers and not the server.
⌠where the $:/status/IsLoggedIn is served up by TiddlyHost as âyesâ only when the wiki is opened from tiddlyhost control panel (and/or when tiddlyhost control panel is already open within browser session â Iâm not sure on the exact details, but it works pretty well for me).
One is private content, and behind an nginx reverse proxy with nginx enforced authentication (nginx also sets a cookie, and if you have the cookie, it skips auth). This lets me reach my private TW from my phone or laptop, no matter where I am, and 99% of the time those devices already have the cookie, so I donât get bothered by auth either.
The other is public content (and Iâll be aiming for MWS down the track for it). For now, itâs protected from editing from TWâs own auth mechanism:
Itâs then made public on a different port, via another reverse proxy, ensuring I get access logs. Visiting itâs URL without auth provides a read-only wiki for guests.
My understanding is that without the auth, itâs not susceptible to direct API attacks (I sure hope not, or I need to rethink a few things!)