Is there any way to allow access for external IP only for determined route?
extern crate iron;
extern crate staticfile;
extern crate mount;
fn main() {
let mut mount = mount::Mount::new();
mount.mount("/", staticfile::Static::new(std::path::Path::new("M:\\_users\\xinxilas\\Desktop\\ame.js")));
mount.mount("/image", staticfile::Static::new(std::path::Path::new("M:\\Dropbox\\image")));
iron::Iron::new(mount).http("127.0.0.1:80").unwrap();
}
I would like allow internet access for "/image", but not for "/"
i.e
fn main() {
let mut mount = mount::Mount::new();
let mut mount2 = mount::Mount::new();
mount.mount("/", staticfile::Static::new(std::path::Path::new("M:\\_users\\xinxilas\\Desktop\\ame.js")));
mount2.mount("/image", staticfile::Static::new(std::path::Path::new("M:\\Dropbox\\image")));
iron::Iron::new(mount).http("127.0.0.1:80").unwrap();
iron::Iron::new(mount2).http("0.0.0.0:8080").unwrap();
}
Can someone give me a tip?