Remove unnecessary imports from cors plugin
This commit is contained in:
parent
1566da1f8f
commit
335a7a76b1
1 changed files with 4 additions and 4 deletions
|
@ -4,11 +4,10 @@ import copy
|
||||||
|
|
||||||
from Plugin import PluginManager
|
from Plugin import PluginManager
|
||||||
from Translate import Translate
|
from Translate import Translate
|
||||||
from util import helper
|
|
||||||
from Debug import Debug
|
|
||||||
if "_" not in locals():
|
if "_" not in locals():
|
||||||
_ = Translate("plugins/Cors/languages/")
|
_ = Translate("plugins/Cors/languages/")
|
||||||
|
|
||||||
|
|
||||||
def getCorsPath(site, inner_path):
|
def getCorsPath(site, inner_path):
|
||||||
match = re.match("^cors-([A-Za-z0-9]{26,35})/(.*)", inner_path)
|
match = re.match("^cors-([A-Za-z0-9]{26,35})/(.*)", inner_path)
|
||||||
if not match:
|
if not match:
|
||||||
|
@ -74,6 +73,7 @@ class UiWebsocketPlugin(object):
|
||||||
if not site:
|
if not site:
|
||||||
self.server.site_manager.need(address)
|
self.server.site_manager.need(address)
|
||||||
|
|
||||||
|
|
||||||
@PluginManager.registerTo("UiRequest")
|
@PluginManager.registerTo("UiRequest")
|
||||||
class UiRequestPlugin(object):
|
class UiRequestPlugin(object):
|
||||||
# Allow to load cross origin files using /cors-address/file.jpg
|
# Allow to load cross origin files using /cors-address/file.jpg
|
||||||
|
|
Loading…
Reference in a new issue