Added base_dir param to limit the access
Added base_dir param to limit the access