Skip to content

Commit

Permalink
Merge pull request #1232 from glorpen/master
Browse files Browse the repository at this point in the history
Don't start http server for file:// urls.
  • Loading branch information
r0x0r authored Oct 12, 2023
2 parents 6d2b5b2 + 004c06b commit b710da4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions webview/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ def is_app(url: str | None) -> bool:


def is_local_url(url: str | None) -> bool:
return not (
(is_app(url)) or ((not url) or (url.startswith('http://')) or (url.startswith('https://')))
)
return not ((is_app(url)) or (
(not url) or (url.startswith('http://')) or (url.startswith('https://')) or url.startswith('file://')))


def needs_server(urls: list[str]) -> bool:
Expand Down

0 comments on commit b710da4

Please sign in to comment.