Releases: orhun/rustypaste
v0.12.0
Added
- Add an endpoint for retrieving a list of files (#94)
Set the expose_list
option to true
in the configuration file for enabling this feature. It is disabled as default.
[server]
expose_list = true
Then you can receive the list of files as JSON via /list
endpoint:
$ curl "http://<server_address>/list" | jq .
[
{
"file_name": "accepted-cicada.txt",
"file_size": 241,
"expires_at_utc": null
},
{
"file_name": "evolving-ferret.txt",
"file_size": 111,
"expires_at_utc": "2023-08-07 10:51:14"
}
]
- Support multiple auth tokens (#84)
auth_token
option is now deprecated and replaced with auth_tokens
which supports an array of authentication tokens. For example:
[server]
auth_tokens = [
"super_secret_token1",
"super_secret_token2",
]
- Add new line character to most prominent messages (#97)
This is a follow-up to #72 for making the terminal output better:
$ curl http://localhost:8000/sweeping-tahr
unauthorized
Changed
- Bump Shuttle to
0.23.0
- Bump dependencies
Fixed
- Deploy the Shuttle service when a new tag is created
v0.11.1
v0.11.0
Added
- Add a new section for the landing page
- Also, support a file for the landing page (#64)
Migration path:
Old:
[server]
landing_page = "Landing page text."
landing_page_file = "index.html"
landing_page_content_type = "text/html; charset=utf-8"
New:
[landing_page]
text = "Landing page text."
file = "index.html"
content_type = "text/html; charset=utf-8"
The configuration is backwards compatible but we recommend using the new landing_page
section as shown above since the other fields are now deprecated.
- Add random suffix mode (#69)
- Support appending a random suffix to the filename before the extension. For example,
foo.tar.gz
will result infoo.eu7f92x1.tar.gz
- Support appending a random suffix to the filename before the extension. For example,
To enable, set suffix_mode
to true
:
[paste]
random_url = { enabled = true, type = "alphanumeric", length = 6, suffix_mode = true }
-
Honor X-Forward-* headers (
X-Forwarded-For
/X-Forwarded-Host
/X-Forwarded-Proto
) (#61)- This would be really useful to have for setups where the service is running behind a reverse-proxy or gateway and the possibility to adjust the logging output based on their availability, to have the real IP addresses of the clients available in the log.
-
Add new line character to the 404 message (#72)
Terminal output will look better when the file is not found:
$ curl http://localhost:8000/sweeping-tahr
file is not found or expired :(
- Add editorconfig for correctly formatting the test fixture files
- Add pull request template
Changed
-
Bump Shuttle to
0.20.0
-
List all the supported units in the documentation (#63)
-
Note that the Alpine Linux package is moved to the community
-
Bump dependencies
Fixed
- Use the static folder for the Shuttle config (#70)
- There was a regression in the previous release that has caused the static folder to be not present in Shuttle deployments. This shouldn't be an issue anymore and the deployment should be live.
- Also, it is now possible to trigger a deployment manually via GitHub Actions.
Thanks to @tessus for his contributions to this release!
v0.10.1
Added
- Add a middleware for checking the content length
- Before, the upload size was checked after full upload which was clearly wrong.
- With this change, total amount of bytes to upload is checked via
Content-Length
header before the upload.
Changed
- Bump Shuttle to
0.18.0
- Bump hotwatch to 0.5.0
- Fixes
RUSTSEC-2020-0016
- Fixes
Fixed
- Do not drop the config watcher
- Since
0.9.0
, the configuration watcher was dropped early which caused for it to not work and resulted in mysterious spikes in CPU usage. - With this version, this issue is fixed.
- Since
v0.10.0
Added
- Support one shot URLs
With using the oneshot_url
multipart field, you can now shorten an URL and make it disappear after viewed once:
curl -F "oneshot_url=https://example.com" "<server_address>"
- Allow configuring the content type for the landing page
landing_page_content_type
is added as a configuration option for setting the Content-Type
header:
[server]
landing_page = ""
landing_page_content_type = "text/plain; charset=utf-8"
- Add information/example about using HTML forms
With utilizing the newly added option for the content type, you can now use HTML forms for the landing page:
[server]
landing_page = "<html>"
landing_page_content_type = "text/html; charset=utf-8"
There is an example added to the repository: html_form.toml
Also, there is an ongoing discussion about refactoring the usage of landing page fields in the configuration file. See #52
- An informative log message is added for showing the server address at startup
v0.9.1
v0.9.0
The public instance is now available at https://rustypaste.shuttleapp.rs 🚀
Read the blog post about rustypaste
and Shuttle deployments: https://blog.orhun.dev/blazingly-fast-file-sharing
Added
- Deploy on Shuttle.rs
- Support setting a default expiry time
You can now specify a expiry time for uploaded files. For example, if you want all the files to expire after one hour:
[paste]
default_expiry = "1h"
- Support overriding the server URL
If you are using rustypaste
with a redirect or reverse proxy, it is now possible to set a different URL for the returned results:
[server]
url = "https://rustypaste.shuttleapp.rs"
- Add instructions for installing on Alpine Linux
rustypaste
is now available in testing repositories.
-
Add new crate features
shuttle
: enable an entry point for deploying on Shuttleopenssl
: use distro OpenSSL (binary size is reduced ~20% in release mode)rustls
: use rustls (enabled as default)
Changed
- Make the default landing page fancier
- Generate SBOM attestation for the Docker image
Updated
- Bump dependencies
- Update the funding options
- Consider donating if you liked
rustypaste
: https://donate.orhun.dev 💖
- Consider donating if you liked
v0.8.4
Added
- Allow downloading files via
?download=true
parameter- If you specify this for a file (e.g.
<server_address>/file?download=true
),rustypaste
will override the MIME type toapplication/octet-stream
and this will force your browser to download the file. - This is useful when e.g. you want to be able to share the link to a file that would play in the browser (like
.mp4
) but also share a link that will auto-download as well.
- If you specify this for a file (e.g.