Start to create Python client
This commit is contained in:
@ -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),
|
||||
|
@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user