mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2025-09-04 00:20:39 +00:00
Compare commits
1 Commits
v2.0.0-rc.
...
v2.0.0
Author | SHA1 | Date | |
---|---|---|---|
9590c9b567 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.0.0] - 2022-07-16
|
||||
|
||||
### Added
|
||||
|
||||
- Theming for logo and description text
|
||||
|
||||
### Changed
|
||||
|
||||
- Moved to redis
|
||||
- New html sanitizing library
|
||||
|
||||
## [2.0.0-rc.0] - 2022-07-15
|
||||
|
||||
### Added
|
||||
|
@@ -82,7 +82,7 @@ services:
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
SIZE_LIMIT: 4M
|
||||
SIZE_LIMIT: 4 MiB
|
||||
ports:
|
||||
- 80:5000
|
||||
```
|
||||
|
@@ -78,7 +78,7 @@ services:
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
SIZE_LIMIT: 4M
|
||||
SIZE_LIMIT: 4 MiB
|
||||
ports:
|
||||
- 80:5000
|
||||
```
|
||||
|
2
backend/Cargo.lock
generated
2
backend/Cargo.lock
generated
@@ -424,7 +424,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cryptgeon"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0"
|
||||
dependencies = [
|
||||
"actix-files",
|
||||
"actix-web",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cryptgeon"
|
||||
version = "2.0.0-rc.0"
|
||||
version = "2.0.0"
|
||||
authors = ["cupcakearmy <hi@nicco.io>"]
|
||||
edition = "2021"
|
||||
|
||||
|
@@ -9,10 +9,10 @@ lazy_static! {
|
||||
|
||||
// CONFIG
|
||||
lazy_static! {
|
||||
pub static ref LIMIT: u32 =
|
||||
pub static ref LIMIT: usize =
|
||||
Byte::from_str(std::env::var("SIZE_LIMIT").unwrap_or("1 KiB".to_string()))
|
||||
.unwrap()
|
||||
.get_bytes() as u32;
|
||||
.get_bytes() as usize;
|
||||
pub static ref MAX_VIEWS: u32 = std::env::var("MAX_VIEWS")
|
||||
.unwrap_or("100".to_string())
|
||||
.parse()
|
||||
|
@@ -1,18 +1,11 @@
|
||||
use crate::config;
|
||||
use actix_web::web;
|
||||
use byte_unit::Byte;
|
||||
use mime;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref LIMIT: usize =
|
||||
Byte::from_str(std::env::var("SIZE_LIMIT").unwrap_or("1 KiB".to_string()))
|
||||
.unwrap()
|
||||
.get_bytes() as usize;
|
||||
}
|
||||
|
||||
pub fn init(cfg: &mut web::ServiceConfig) {
|
||||
let json = web::JsonConfig::default().limit(*LIMIT);
|
||||
let json = web::JsonConfig::default().limit(*config::LIMIT);
|
||||
let plain = web::PayloadConfig::default()
|
||||
.limit(*LIMIT)
|
||||
.limit(*config::LIMIT)
|
||||
.mimetype(mime::STAR_STAR);
|
||||
cfg.app_data(json).app_data(plain);
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ use crate::status::Status;
|
||||
async fn get_status() -> impl Responder {
|
||||
return HttpResponse::Ok().json(Status {
|
||||
version: config::VERSION.to_string(),
|
||||
max_size: *config::LIMIT,
|
||||
max_size: *config::LIMIT as u32,
|
||||
max_views: *config::MAX_VIEWS,
|
||||
max_expiration: *config::MAX_EXPIRATION,
|
||||
allow_advanced: *config::ALLOW_ADVANCED,
|
||||
|
@@ -14,6 +14,6 @@ services:
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
SIZE_LIMIT: 128M
|
||||
SIZE_LIMIT: 128 MiB
|
||||
ports:
|
||||
- 80:5000
|
||||
|
Reference in New Issue
Block a user