summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorwhew <73732390+whew@users.noreply.github.com>2021-05-13 08:14:33 +0000
committerGitHub <noreply@github.com>2021-05-13 08:14:33 +0000
commitc19dc4fa785dfde507e48efb0cc6dd6e823d5928 (patch)
tree2c36b3d47627ad68cfc9624e3c87f1d2c4c2094f /cli
parent986a9a09a91c956d55f7880f65154d3f5cb96f66 (diff)
downloadonionshare-c19dc4fa785dfde507e48efb0cc6dd6e823d5928.tar.gz
onionshare-c19dc4fa785dfde507e48efb0cc6dd6e823d5928.zip
Update send_base_mode.py
Diffstat (limited to 'cli')
-rw-r--r--cli/onionshare_cli/web/send_base_mode.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/onionshare_cli/web/send_base_mode.py b/cli/onionshare_cli/web/send_base_mode.py
index 742f6f75..d269dc69 100644
--- a/cli/onionshare_cli/web/send_base_mode.py
+++ b/cli/onionshare_cli/web/send_base_mode.py
@@ -145,10 +145,9 @@ class SendBaseModeWeb:
# If filesystem_path is None, this is the root directory listing
files, dirs = self.build_directory_listing(path, filenames, filesystem_path)
- r = self.directory_listing_template(
+ return self.directory_listing_template(
path, files, dirs, breadcrumbs, breadcrumbs_leaf
)
- return self.web.add_security_headers(r)
def build_directory_listing(self, path, filenames, filesystem_path):
files = []
@@ -286,7 +285,6 @@ class SendBaseModeWeb:
"filename*": "UTF-8''%s" % url_quote(basename),
}
r.headers.set("Content-Disposition", "inline", **filename_dict)
- r = self.web.add_security_headers(r)
(content_type, _) = mimetypes.guess_type(basename, strict=False)
if content_type is not None:
r.headers.set("Content-Type", content_type)