summaryrefslogtreecommitdiff
path: root/blob
diff options
context:
space:
mode:
Diffstat (limited to 'blob')
-rw-r--r--blob/database_schema2
-rw-r--r--blob/nginx_rewrite_rules11
2 files changed, 8 insertions, 5 deletions
diff --git a/blob/database_schema b/blob/database_schema
index ec4a649..01a8442 100644
--- a/blob/database_schema
+++ b/blob/database_schema
@@ -2,6 +2,6 @@
CREATE TABLE IF NOT EXISTS user (id INTEGER PRIMARY KEY, name TEXT UIQUE, salt TEXT, password TEXT, email TEXT UNIQUE, invites INTEGER, senpai INTEGER, key TEXT, status INTEGER, register TEXT);
-CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, parent INTEGER, owner INTEGER, name TEXT, folder TEXT, mime TEXT, size INTEGER, share TEXT, extra TEXT, FOREIGN KEY(owner) REFERENCES user(id));
+CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, parent INTEGER, owner INTEGER, name TEXT, folder TEXT, mime TEXT, size INTEGER, share TEXT, hash TEXT, FOREIGN KEY(owner) REFERENCES user(id));
CREATE TABLE IF NOT EXISTS log (id INTEGER PRIMARY KEY, user INTEGER, login TEXT, FOREIGN KEY(user) REFERENCES user(id));
diff --git a/blob/nginx_rewrite_rules b/blob/nginx_rewrite_rules
index 0b925f3..aded2ed 100644
--- a/blob/nginx_rewrite_rules
+++ b/blob/nginx_rewrite_rules
@@ -1,7 +1,10 @@
-location /robots.txt {} #stop rewriting the robots.txt
+error_page 401 403 404 /httperror.php?e=40x;
+error_page 500 502 504 /httperror.php?e=50x;
-location /favicon.ico {}
-location /static {}
+location /robots.txt {} #stop rewriting the robots.txt
+
+location /favicon.ico {}
+location /static {}
#location ~* ^/.+[^/].+\.css {}
#location ~* ^/.+[^/].+\.png {}
@@ -27,7 +30,7 @@ location ~* ^/?user(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {
rewrite ^/?user(\?[0-9a-zA-Z]*(=[0-9a-zA-Z]*)?)? /index.php?task=user&arguments=$1 last;
}
-location ~* \.php(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {} #empty block to catch all
+#location ~* \.php(\?[0-9a-zA-Z]+(=[0-9a-zA-Z]*)?)?$ {} #empty block to catch all
location / {
rewrite ^/([0-9a-zA-Z-_]+)/(.*) /index.php?name=$1&folder=$2 last;