Fix content type detection for options request
This commit is contained in:
parent
2447279191
commit
6c68f8dd6c
1 changed files with 4 additions and 1 deletions
|
@ -49,6 +49,9 @@ class UiRequest(object):
|
||||||
path = re.sub("^http://", "/", path) # Remove begining http for chrome extension .bit access
|
path = re.sub("^http://", "/", path) # Remove begining http for chrome extension .bit access
|
||||||
|
|
||||||
if self.env["REQUEST_METHOD"] == "OPTIONS":
|
if self.env["REQUEST_METHOD"] == "OPTIONS":
|
||||||
|
if "/" not in path.strip("/"):
|
||||||
|
content_type = self.getContentType("index.html")
|
||||||
|
else:
|
||||||
content_type = self.getContentType(path)
|
content_type = self.getContentType(path)
|
||||||
self.sendHeader(content_type=content_type)
|
self.sendHeader(content_type=content_type)
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Reference in a new issue