mirror of
https://github.com/telemt/telemt.git
synced 2026-11-03 14:22:06 +03:00
WEB: Base Path added
This commit is contained in:
@@ -62,6 +62,15 @@ pub(super) fn generic_not_found() -> HttpResponse {
|
||||
full_response(StatusCode::NOT_FOUND, Bytes::from_static(b"not found\n"))
|
||||
}
|
||||
|
||||
/// Builds a non-cacheable local rejection for misplaced internal credentials.
|
||||
pub(super) fn private_not_found() -> HttpResponse {
|
||||
let mut response = generic_not_found();
|
||||
response
|
||||
.headers_mut()
|
||||
.insert(header::CACHE_CONTROL, HeaderValue::from_static("no-store"));
|
||||
response
|
||||
}
|
||||
|
||||
/// Builds one in-memory response with an exact content length.
|
||||
pub(super) fn full_response(status: StatusCode, body: Bytes) -> HttpResponse {
|
||||
let length = body.len();
|
||||
|
||||
Reference in New Issue
Block a user