Update
This commit is contained in:
parent
f505689c9c
commit
2481ac9f70
3 changed files with 3 additions and 10 deletions
|
|
@ -1,19 +1,13 @@
|
|||
use std::error::Error;
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
use std::ops::Deref;
|
||||
|
||||
use command_runner::CommandRunner;
|
||||
use symbols::Symbol;
|
||||
use symbols::file::File as FileSymbol;
|
||||
use resources::Resource;
|
||||
|
||||
pub struct NginxReload<'a> {
|
||||
command_runner: &'a CommandRunner,
|
||||
}
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
impl<'a> NginxReload<'a> {
|
||||
pub fn new(command_runner: &'a CommandRunner) -> Self {
|
||||
NginxReload {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@ impl<'a> NginxServer<'a, String> {
|
|||
}
|
||||
|
||||
pub fn new_redir(domain: &'a str, target: &'a str, command_runner: &'a CommandRunner) -> Self {
|
||||
let content = NginxServer::server_config(domain, &format!("return 302 $scheme://{}$request_uri;", target));
|
||||
let content = NginxServer::server_config(domain, &format!("location / {{
|
||||
return 301 $scheme://{}$request_uri;
|
||||
}}", target));
|
||||
NginxServer::new(domain, content, command_runner)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,8 @@ use std::error::Error;
|
|||
use std::fmt;
|
||||
use std::fs;
|
||||
use std::io;
|
||||
use std::ops::Deref;
|
||||
use std::path::Path;
|
||||
|
||||
use symbols::Symbol;
|
||||
use resources::{DirResource, Resource};
|
||||
|
||||
pub struct NotASymlink<D> where D: AsRef<str> + fmt::Display {
|
||||
path: D
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue