Start to create Python client

This commit is contained in:
2024-06-29 18:05:58 +02:00
parent 1d32ca1559
commit dca8848ec9
8 changed files with 57 additions and 0 deletions

View File

@ -31,6 +31,10 @@ pub async fn unsecure_server() -> anyhow::Result<()> {
"/",
web::get().to(unsecure_server_controller::unsecure_home),
)
.route(
"/secure_origin",
web::get().to(unsecure_server_controller::secure_origin),
)
.route(
"/pki/{file}",
web::get().to(unsecure_pki_controller::serve_pki_file),

View File

@ -1,3 +1,4 @@
use crate::app_config::AppConfig;
use actix_web::HttpResponse;
pub async fn unsecure_home() -> HttpResponse {
@ -5,3 +6,7 @@ pub async fn unsecure_home() -> HttpResponse {
.content_type("text/plain")
.body("SolarEnergy unsecure central backend")
}
pub async fn secure_origin() -> HttpResponse {
HttpResponse::Ok().body(AppConfig::get().secure_origin())
}