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