pluginserver 0.7.0__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pluginserver-0.7.0/pluginserver.egg-info → pluginserver-0.8.1}/PKG-INFO +1 -1
- {pluginserver-0.7.0 → pluginserver-0.8.1}/plugincore/pserv.py +23 -1
- {pluginserver-0.7.0 → pluginserver-0.8.1/pluginserver.egg-info}/PKG-INFO +1 -1
- {pluginserver-0.7.0 → pluginserver-0.8.1}/setup.py +1 -1
- {pluginserver-0.7.0 → pluginserver-0.8.1}/LICENSE.txt +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/MANIFEST.in +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/README.md +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/plugincore/__init__.py +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/plugincore/baseplugin.py +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/plugincore/configfile.py +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/plugincore/cors.py +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/plugincore/pluginmanager.py +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/pluginserver.egg-info/SOURCES.txt +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/pluginserver.egg-info/dependency_links.txt +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/pluginserver.egg-info/entry_points.txt +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/pluginserver.egg-info/requires.txt +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/pluginserver.egg-info/top_level.txt +0 -0
- {pluginserver-0.7.0 → pluginserver-0.8.1}/setup.cfg +0 -0
|
@@ -102,6 +102,28 @@ def main():
|
|
|
102
102
|
|
|
103
103
|
app.add_routes(routes)
|
|
104
104
|
app.on_shutdown.append(on_shutdown)
|
|
105
|
+
if 'documents' in globalCfg.paths:
|
|
106
|
+
"""
|
|
107
|
+
if configured set up static page service
|
|
108
|
+
"""
|
|
109
|
+
if ':' in globalCfg.paths.documents:
|
|
110
|
+
dname, dpath = globalCfg.paths.documents.split(':')
|
|
111
|
+
else:
|
|
112
|
+
dname, dpath = 'docs', globalCfg.paths.documents
|
|
113
|
+
|
|
114
|
+
if 'indexfile' in globalCfg.paths:
|
|
115
|
+
indexfile = globalCfg.paths.indexfile
|
|
116
|
+
print(f"indexfile for static service is {indexfile}")
|
|
117
|
+
# Route to handle /docs/ (with or without trailing slash)
|
|
118
|
+
async def default_doc_handler(request):
|
|
119
|
+
return web.FileResponse(os.path.join(dpath, indexfile))
|
|
120
|
+
|
|
121
|
+
app.router.add_get(f'/{dname}', default_doc_handler)
|
|
122
|
+
app.router.add_get(f'/{dname}/', default_doc_handler)
|
|
123
|
+
|
|
124
|
+
print(f"Setting up static page delivery for {dname} from {dpath}")
|
|
125
|
+
app.router.add_static(f"/{dname}/", path=dpath, name=dname)
|
|
126
|
+
|
|
105
127
|
try:
|
|
106
128
|
web.run_app(app, host=globalCfg.network.bindto, port=globalCfg.network.port, ssl_context=ssl_ctx)
|
|
107
129
|
except KeyboardInterrupt:
|
|
@@ -154,7 +176,7 @@ def register_plugin_route(plugin_id, instance, config):
|
|
|
154
176
|
@routes.route('*', f'/{plugin_id}')
|
|
155
177
|
@routes.route('*', f'/{plugin_id}/{{tail:.*}}')
|
|
156
178
|
async def handle(request, inst=instance, pid=plugin_id, cfg=config):
|
|
157
|
-
print(request.remote, '- request -', pid)
|
|
179
|
+
#print(request.remote, '- request -', pid)
|
|
158
180
|
plugin = manager.get_plugin(pid)
|
|
159
181
|
data = {}
|
|
160
182
|
if request.method == 'POST' and request.can_read_body:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|