Commit Graph

12 Commits

Author SHA1 Message Date
Gunwant Jain
1e0e3b319c bin v2.2.1
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-04-23 05:31:35 +05:30
Gunwant Jain
c8637b04dd Index: Add option to remove /client help
fixes #7

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-04-23 04:48:06 +05:30
Gunwant Jain
efc1a9df58 bin v2.2.0
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-02-08 02:00:20 +05:30
Leonora Tindall
2ab7ddb9c8 Add cache-busting and server headers with a wrapper.
In order to support custom headers for various response types,
  this commit adds a wrapper type, ResponseWrapper, which can service
  all types of response in `bin`.

For paste objects, the preferred `Last-Modified` is used, so that caches
  can compare their exact timings with the HEAD response when
  revalidating.

For static objects, an `ETag` is used instead, based on the Cargo version
  and git hash of the codebase at compilation time; a `build.rs` is used
  for this.
2022-02-05 06:20:33 +05:30
Gunwant Jain
54aa737661 bin: v2.0.0
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-20 16:52:21 +05:30
Gunwant Jain
6961ed59b4 main: Add arguments and the respective parsing
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 15:47:54 +05:30
Gunwant Jain
892e84348d static_files: embed files in-binary
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-18 12:16:07 +05:30
Gunwant Jain
33583b71d4 cargo update, fmt and add rust_embed crate
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2022-01-16 23:11:38 +05:30
Gunwant Jain
78d046afbd main: add more routes for pretty pasting
cleaned up code and added a route for signifying code language
explicitly at `/p/<filename>.<ext>`
Also async-ified the server after upgrading Rocket to 0.5-rc1

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2021-07-08 18:48:01 +05:30
Gunwant Jain
1bc532d237 index: improve the usage guide
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-30 03:41:54 +05:30
Gunwant Jain
66ea75de7f add /p/<id> routes
This is to work with text/plain type files only

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-29 17:37:29 +05:30
Gunwant Jain
805e4ce7d2 initialise
routes:
    GET  /<id>
    POST /

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
2020-12-29 15:44:15 +05:30