Fix Caddy configuration patching
All checks were successful
Build / build (push) Successful in 1m57s
All checks were successful
Build / build (push) Successful in 1m57s
This commit is contained in:
parent
0718608de1
commit
ee494709ac
1 changed files with 3 additions and 3 deletions
|
@ -143,9 +143,9 @@ impl CaddyController {
|
||||||
}
|
}
|
||||||
StatusCode::NotFound => {
|
StatusCode::NotFound => {
|
||||||
// The site does not yet exist.
|
// The site does not yet exist.
|
||||||
|
let mut request = Request::post(Url::from_str("http://localhost/config/apps/http/servers/srv0/routes")?);
|
||||||
request.set_method(Method::Post);
|
request.insert_header("Content-Type", "application/json");
|
||||||
*request.url_mut() = Url::from_str("http://localhost/config/apps/http/servers/srv0/routes")?;
|
request.set_body(configuration_object.to_string());
|
||||||
let mut response = request_uds(&self.admin_api_socket_path, request).await.unwrap();
|
let mut response = request_uds(&self.admin_api_socket_path, request).await.unwrap();
|
||||||
let status = response.status();
|
let status = response.status();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue