mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
refactor: rename --cors to --enable-cors (#57)
BREAKING CHANGE: `--cors` rename to `--enable-cors`
This commit is contained in:
@@ -59,7 +59,7 @@ impl Server {
|
||||
) -> Result<Response, hyper::Error> {
|
||||
let method = req.method().clone();
|
||||
let uri = req.uri().clone();
|
||||
let cors = self.args.cors;
|
||||
let enable_cors = self.args.enable_cors;
|
||||
|
||||
let mut res = match self.handle(req).await {
|
||||
Ok(res) => {
|
||||
@@ -77,7 +77,7 @@ impl Server {
|
||||
}
|
||||
};
|
||||
|
||||
if cors {
|
||||
if enable_cors {
|
||||
add_cors(&mut res);
|
||||
}
|
||||
Ok(res)
|
||||
|
||||
Reference in New Issue
Block a user