aboutsummaryrefslogtreecommitdiff
path: root/config.cfg.tpl
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-02-13 21:47:21 -0500
committerB. Stack <bgstack15@gmail.com>2022-02-13 21:54:20 -0500
commit85df4b3dc87003ae738f2676a99b88a83f3ac05a (patch)
tree15b892a06b81451d83f73cf0f8822c9bf262c4af /config.cfg.tpl
parentadd redirects after delete, and simplify css calls (diff)
downloadstackbin-85df4b3dc87003ae738f2676a99b88a83f3ac05a.tar.gz
stackbin-85df4b3dc87003ae738f2676a99b88a83f3ac05a.tar.bz2
stackbin-85df4b3dc87003ae738f2676a99b88a83f3ac05a.zip
add expiry, and wsgi usage to support that
The flask dev server seems incapable of using the @timer decorator, so we need the whole wsgi implementation, for which I've added a script. Arbitrary expiration options are available in the config file.
Diffstat (limited to 'config.cfg.tpl')
-rw-r--r--config.cfg.tpl13
1 files changed, 13 insertions, 0 deletions
diff --git a/config.cfg.tpl b/config.cfg.tpl
index 50b4419..23fb072 100644
--- a/config.cfg.tpl
+++ b/config.cfg.tpl
@@ -2,3 +2,16 @@ DEBUG=False
SQLALCHEMY_DATABASE_URI='sqlite:///pastebin.db'
SECRET_KEY='development-key'
SALT='jackson'
+DELETESALT='differentstring'
+APPNAME='stackbin'
+# LOOP_DELAY in seconds is how many seconds between running the expiration cleanup task
+LOOP_DELAY = 5 * 3
+
+# Disable this variable entirely, to disable any choices for expiration
+# Any very simple expression for relative time can be used here. This will be processed by pyparsedate.
+EXPIRATION_OPTIONS = [
+ "never",
+ "1 day",
+ "1 hour",
+ "15 minutes"
+]
bgstack15