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,7 +49,10 @@ class UiRequest(object):
|
|||
path = re.sub("^http://", "/", path) # Remove begining http for chrome extension .bit access
|
||||
|
||||
if self.env["REQUEST_METHOD"] == "OPTIONS":
|
||||
content_type = self.getContentType(path)
|
||||
if "/" not in path.strip("/"):
|
||||
content_type = self.getContentType("index.html")
|
||||
else:
|
||||
content_type = self.getContentType(path)
|
||||
self.sendHeader(content_type=content_type)
|
||||
return ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue