master
Aevann1 2022-03-24 04:55:19 +02:00
parent 842f185c2d
commit 7b469947e1
2 changed files with 9 additions and 1 deletions

View File

@ -23,6 +23,14 @@ if "load_chat" in sys.argv or SITE == 'localhost':
def chat( v):
return render_template("chat.html", v=v, messages=messages)
@app.get('/static/chat.js')
@limiter.exempt
def chatjs(path):
resp = make_response(send_from_directory('assets', 'js/chat.js'))
return resp
@socketio.on('speak')
@limiter.limit("3/second;10/minute")
@auth_required

View File

@ -81,7 +81,7 @@
<input id="vid" type="hidden" value="{{v.id}}">
<input id="site_name" type="hidden" value="{{SITE_NAME}}">
<script data-cfasync="false" src="/assets/js/chat.js?v=29"></script>
<script data-cfasync="false" src="/static/chat.js?v=1"></script>
<style>
#chat-window {