Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
de-conf committed Jul 26, 2023
1 parent fcb74fc commit 520e107
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ date: 2021-01-16 03:26:09.614299435 UTC
digest: 0b8b60248fad7ac6dfac221b7e01a8b91c772421a15b387dd1fb2d6a94aee438
short: e74l
size: 3
url: http://https://deconf.xyz/pb/e74l
url: https://deconf.xyz/pb/e74l
status: created
uuid: 7535e567-173f-4ba0-98ce-71cdd8f02d69
```
Expand All @@ -35,7 +35,7 @@ uuid: 7535e567-173f-4ba0-98ce-71cdd8f02d69
```
> curl -X PUT -F c=@- deconf.xyz/pb/7535e567-173f-4ba0-98ce-71cdd8f02d69 < config.yaml
http://deconf.xyz/pb/e74l updated
https://deconf.xyz/pb/e74l updated
```
### Using mimetypes

Expand All @@ -52,12 +52,12 @@ deleted 7535e567-173f-4ba0-98ce-71cdd8f02d69
### Shortening URLs

```
> echo http://google.com | curl -F c=@- deconf.xyz/pb/u
> echo https://google.com | curl -F c=@- deconf.xyz/pb/u
date: 2021-01-16 03:29:13.865511999 UTC
digest: a1adc32c271516bfb33069304087db349649146f24744b4028d2f975697fd707
short: 1unf
size: 11
url: http://deconf.xyz/pb/1unf
url: https://deconf.xyz/pb/1unf
status: created
uuid: b87dcc37-a4c2-4d18-a3a3-c2d875912cde
```
Expand All @@ -76,7 +76,7 @@ uuid: b87dcc37-a4c2-4d18-a3a3-c2d875912cde
add '.rs' to the url to highlight rust source

```
http://deconf.xyz/pb/1e6d.rs
https://deconf.xyz/pb/1e6d.rs
```

### Vanity pastes
Expand All @@ -87,7 +87,7 @@ date: 2021-01-16 03:34:22.359830934 UTC
digest: e2f55e5ed88dee2a50c9bb255ad87657e7f173e2560e27ceec8b206e2bc4afaf
short: 20ko
size: 4
url: http://deconf.xyz/pb/mom
url: https://deconf.xyz/pb/mom
status: created
uuid: bac23f0c-0f06-4525-8ae4-624268485ef7
```
Expand All @@ -100,13 +100,13 @@ date: 2021-01-16 03:32:33.225306167 UTC
digest: 15cefec0e22ce1b1bfc1d06c77620cc41f8d6f1664edb023a8d63b5d0b6ef5a7
short: 19vl
size: 45
url: http://deconf.xyz/pb/19vl
url: https://deconf.xyz/pb/19vl
status: created
uuid: 7ede8735-7af3-4ee7-87bb-fc63d2a39306
> curl http://deconf.xyz/pb/19vl
> curl https://deconf.xyz/pb/19vl
This message will self-destruct in 5 seconds
> sleep 5
> curl http://deconf.xyz/pb/19vl
> curl https://deconf.xyz/pb/19vl
expired
```

Expand Down
4 changes: 2 additions & 2 deletions src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async fn process_upload(
size: content.unwrap().len(),
status: upload_status,
url: format!(
"http://{}/{}",
"https://{}/{}",
url,
custom_url.unwrap_or(item.short.clone())
),
Expand Down Expand Up @@ -345,7 +345,7 @@ pub async fn update_data(
Ok(_) => {
log::info!("update {} success", key);
return Ok(warp::reply::with_status(
format!("http://{}/{} updated", host, item.short),
format!("https://{}/{} updated", host, item.short),
http::StatusCode::OK,
)
.into_response());
Expand Down

0 comments on commit 520e107

Please sign in to comment.