2022-03-11 16:02:25 -05:00
|
|
|
[config]
|
2023-05-13 15:50:39 -04:00
|
|
|
refresh_rate = "1s"
|
2022-03-11 16:02:25 -05:00
|
|
|
|
2021-07-23 15:52:00 -04:00
|
|
|
[server]
|
2023-05-13 15:50:39 -04:00
|
|
|
address = "127.0.0.1:8000"
|
2023-05-14 12:03:53 -04:00
|
|
|
#url = "https://rustypaste.shuttleapp.rs"
|
2021-07-23 15:52:00 -04:00
|
|
|
#workers=4
|
2023-05-13 15:50:39 -04:00
|
|
|
max_content_length = "10MB"
|
|
|
|
upload_path = "./upload"
|
|
|
|
timeout = "30s"
|
|
|
|
expose_version = false
|
2023-05-13 18:54:58 -04:00
|
|
|
landing_page = """
|
|
|
|
┬─┐┬ ┬┌─┐┌┬┐┬ ┬┌─┐┌─┐┌─┐┌┬┐┌─┐
|
|
|
|
├┬┘│ │└─┐ │ └┬┘├─┘├─┤└─┐ │ ├┤
|
|
|
|
┴└─└─┘└─┘ ┴ ┴ ┴ ┴ ┴└─┘ ┴ └─┘
|
|
|
|
|
|
|
|
Submit files via HTTP POST here:
|
|
|
|
curl -F 'file=@example.txt' <server>
|
|
|
|
This will return the URL of the uploaded file.
|
2022-10-03 17:27:35 -04:00
|
|
|
|
|
|
|
The server administrator might remove any pastes that they do not personally
|
|
|
|
want to host.
|
|
|
|
|
|
|
|
If you are the server administrator and want to change this page, just go
|
|
|
|
into your config file and change it! If you change the expiry time, it is
|
|
|
|
recommended that you do.
|
|
|
|
|
|
|
|
By default, pastes expire every hour. The server admin may or may not have
|
2023-05-13 18:54:58 -04:00
|
|
|
changed this.
|
|
|
|
|
|
|
|
Check out the GitHub repository at https://github.com/orhun/rustypaste
|
|
|
|
Command line tool is available at https://github.com/orhun/rustypaste-cli
|
|
|
|
"""
|
2021-07-23 15:52:00 -04:00
|
|
|
|
|
|
|
[paste]
|
2021-07-27 07:00:50 -04:00
|
|
|
random_url = { enabled = true, type = "petname", words = 2, separator = "-" }
|
|
|
|
#random_url = { enabled = true, type = "alphanumeric", length = 8 }
|
2021-07-23 15:52:00 -04:00
|
|
|
default_extension = "txt"
|
2021-08-09 15:28:33 -04:00
|
|
|
mime_override = [
|
2023-05-14 06:38:34 -04:00
|
|
|
{ mime = "image/jpeg", regex = "^.*\\.jpg$" },
|
|
|
|
{ mime = "image/png", regex = "^.*\\.png$" },
|
|
|
|
{ mime = "image/svg+xml", regex = "^.*\\.svg$" },
|
|
|
|
{ mime = "video/webm", regex = "^.*\\.webm$" },
|
|
|
|
{ mime = "video/x-matroska", regex = "^.*\\.mkv$" },
|
|
|
|
{ mime = "application/octet-stream", regex = "^.*\\.bin$" },
|
|
|
|
{ mime = "text/plain", regex = "^.*\\.(log|txt|diff|sh|rs|toml)$" },
|
2021-08-09 15:28:33 -04:00
|
|
|
]
|
2021-08-09 15:48:51 -04:00
|
|
|
mime_blacklist = [
|
2023-05-14 06:38:34 -04:00
|
|
|
"application/x-dosexec",
|
|
|
|
"application/java-archive",
|
|
|
|
"application/java-vm",
|
2021-08-09 15:48:51 -04:00
|
|
|
]
|
2022-06-24 19:57:03 -04:00
|
|
|
duplicate_files = true
|
2023-05-13 18:30:35 -04:00
|
|
|
# default_expiry = "1h"
|
2022-03-23 04:38:32 -04:00
|
|
|
delete_expired_files = { enabled = true, interval = "1h" }
|