0.1.1-cors-internal
Some checks failed
deploy / deploy (push) Failing after 33s

This commit is contained in:
2025-06-02 22:20:37 +03:00
parent 0982dff45b
commit 30000a4803
7 changed files with 315 additions and 156 deletions

View File

@@ -1,10 +1,21 @@
mod upload;
mod proxy;
mod upload;
mod serve_file;
pub use upload::upload_handler;
pub use proxy::proxy_handler;
// pub use serve_file::serve_file;
pub use upload::upload_handler;
// Лимит квоты на пользователя: 2 ГБ в неделю
pub const MAX_WEEK_BYTES: u64 = 2 * 1024 * 1024 * 1024;
use actix_web::{HttpResponse, Result, HttpRequest};
/// Обработчик для корневого пути /
pub async fn root_handler(req: HttpRequest) -> Result<HttpResponse> {
match req.method().as_str() {
"GET" => Ok(HttpResponse::Ok()
.content_type("text/plain")
.body("ok")),
_ => Ok(HttpResponse::MethodNotAllowed().finish())
}
}