diff --git a/http/public/favicon.ico b/http/public/favicon.ico new file mode 100644 index 0000000..178dae5 Binary files /dev/null and b/http/public/favicon.ico differ diff --git a/http/public/index.css b/http/public/index.css index ea30843..6651334 100644 --- a/http/public/index.css +++ b/http/public/index.css @@ -1,4 +1,4 @@ -p { +p, ul, li { color: white; display: block; } @@ -24,7 +24,8 @@ body { } h1, h2 { - color: #e3e3e3; + color: #e3e3e3; + font-family: monospace; } .left { position: absolute; diff --git a/http/sakisafe.pl b/http/sakisafe.pl index cdf3c0a..c238fb5 100755 --- a/http/sakisafe.pl +++ b/http/sakisafe.pl @@ -21,7 +21,17 @@ plugin 'RenderFile'; pledge("stdio prot_exec cpath rpath wpath inet flock fattr") if $^O eq "openbsd"; -# 500 MBs +# INSTANCE CONFIGURATION +our $name = "sakisafe"; +our $version = "2.6.0"; +# Domain and port, for output link +our $domain = "XXXXXXXXXXX"; +our $port = 443; +# Contact info +# Change this with whatever you want +our $contact_info = 'email: saki@sakisafe.lol'; + +# 1 GiBs my $MAX_SIZE = 1024 * 1024 * 1000; @@ -124,7 +134,10 @@ sub handle_file { # Function to log uploaded files -get '/' => 'index'; +get '/' => sub ($c) { + $c->stash(name => $name, contact_info => $contact_info, version => $version); + $c->render(template => 'index'); +}; post '/' => sub ($c) { handle_file($c) }; # Allow files to be downloaded. @@ -162,6 +175,7 @@ app->start; # to get the template here. So a TODO is to fix this. __DATA__ + @@ file.html.ep @@ -183,7 +197,9 @@ __DATA__ @@ index.html.ep - + % layout 'index', name => $name, contact_info => $contact_info, version => $version; + +
curl -F 'file=@-' https://<%= $c->req->url->to_abs->host; %>
Running sakisafe 2.6.0
+(No one has ever asked these questions)
How long are the files stored? Until the heat death of the universe
Do you log IP addresses? Yes. Blame the people uploading illegal stuff to this
+Do you log all the requests? Nah. Only file uploads are logged.
+Can you delete a file I uploaded?
That depends on the instance administrator
+Running sakisafe <%=$version%>