[Self-hosted] Is it possible to strip /timetagger prefix, remove the demo and disable sandbox unless authenticated ?
I'm self-hosting (using the docker image) on a subdomain, meaning when I reach timetagger, my access url becomes something like: https://timetagger.mydomain.tld/timetagger/app
I looked at the docs and the _main_.py file and there doesn't seem to be any option to strip that prefix ?
In fact, in the code there's even a note about it...
We serve at /timetagger for a few reasons, one being that the service worker won't interfere with other stuff you might serve on localhost.
https://github.com/almarklein/timetagger/blob/24ddbe7ce07a740f34d8478b0385947182e0e1da/timetagger/main.py#L81
Would it be possible to change that behavior or would that be too much changes in the app ?
Another question, is it possible to disable the demo and the sandbox unless the user is authenticated ? Right now, unless I had some authentication restriction on the server root, the demo is allowed for anyone.
Thank you
The easiest way is to copy the __main__.py to your own ttboot.py or somerthing, and you can control all the things you mentioned above. Does that make sense?
Ok, what makes sense is that it seems it will be the time for me to try to learn a little bit of python then ;-)
I'll see if I can do a modification conditional to an env var using also the _config.py
Something like app_prefix with a default value of /timetagger unless changed
Didn't find any file ttboot.py in the repo, but as said previously, don't know anything about python right now... will search and learn !
Thanks for your answer !
Didn't find any file ttboot.py in the repo,
I meant this as a file to create yourself. The __main__.py was originally meant as an example main script :)
@typhoe use reverse proxy, like Caddy to redirect to prefix, you wouldn't notice it then.
I am doing the same, my Caddyfile:
timetagger.xxxx.com {
@timetagger_root path /timetagger/
@timetagger_noslash path /timetagger
redir @timetagger_root /timetagger/app/
redir @timetagger_noslash /timetagger/app/
reverse_proxy localhost:8081
}