Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ http {
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;

location ~ ^/(verification|fileupload|filedownload)/ {
location ~ ^/(health|verification|fileupload|filedownload)/ {
proxy_pass http://backend:8000;
}
}
Expand Down
2 changes: 1 addition & 1 deletion conf/nginx.dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ http {
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;

location ~ ^/(verification|fileupload|filedownload)/ {
location ~ ^/(health|verification|fileupload|filedownload)/ {
proxy_pass http://backend:8000;
}

Expand Down
6 changes: 5 additions & 1 deletion cryptify-back-end/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ struct InitResponder {
cryptify_token: CryptifyToken,
}

#[get("/health")]
fn health() -> &'static str {
"OK"
}
#[post("/fileupload/init", data = "<request>")]
async fn upload_init(
config: &State<CryptifyConfig>,
Expand Down Expand Up @@ -431,7 +435,7 @@ async fn rocket() -> _ {

rocket
.attach(cors)
.mount("/", routes![upload_init, upload_chunk, upload_finalize,])
.mount("/", routes![health,upload_init, upload_chunk, upload_finalize,])
.mount("/filedownload", FileServer::from(config.data_dir()))
.attach(AdHoc::config::<CryptifyConfig>())
.manage(Store::new())
Expand Down