mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
change main.py, plugins.html and dev compose for test
*update args send to action.py and remove conditions *remove condition on plugins template because didn't fit new logic *higher bad behavior threshold for testing
This commit is contained in:
parent
c558145582
commit
582cac654f
3 changed files with 8 additions and 11 deletions
|
|
@ -1427,12 +1427,13 @@ def custom_plugin(plugin: str):
|
|||
try:
|
||||
# Try to get the custom plugin custom function and call it
|
||||
method = getattr(actions, plugin)
|
||||
if request.args:
|
||||
res = method(app=app, args=request.args.to_dict())
|
||||
elif request.is_json:
|
||||
res = method(app=app, args=request.json)
|
||||
else:
|
||||
res = method(app=app)
|
||||
queries = request.args.to_dict()
|
||||
try:
|
||||
data = request.json or False
|
||||
except:
|
||||
data = {}
|
||||
|
||||
res = method(app=app, args=queries, data=data)
|
||||
except AttributeError:
|
||||
message = f"The plugin does not have a method, see logs for more details"
|
||||
except:
|
||||
|
|
|
|||
5
src/ui/templates/plugins.html
vendored
5
src/ui/templates/plugins.html
vendored
|
|
@ -21,11 +21,6 @@
|
|||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if plugins_count_pro > 0 and not is_pro_version %}
|
||||
<p class="ml-2 mt-0 mb-2 mr-2 text-red-500 font-bold dark:brightness-95 text-sm">
|
||||
You have pro plugins without active pro version.
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- end info -->
|
||||
<!-- upload layout -->
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ services:
|
|||
USE_CLIENT_CACHE: "yes"
|
||||
USE_GZIP: "yes"
|
||||
DATASTORE_MEMORY_SIZE: "384m"
|
||||
BAD_BEHAVIOR_THRESHOLD: "30"
|
||||
UI_HOST: "http://bw-ui:7000"
|
||||
labels:
|
||||
- "bunkerweb.INSTANCE=yes"
|
||||
|
|
|
|||
Loading…
Reference in a new issue