forked from FrederikBaerentsen/BrickTracker
Fixed https issue with socketio
This commit is contained in:
parent
ef04293355
commit
f4c48a798a
5
app.py
5
app.py
@ -14,9 +14,12 @@ import shutil # save img locally
|
||||
import eventlet
|
||||
from downloadRB import download_and_unzip,get_nil_images
|
||||
from db import initialize_database,get_rows,delete_tables
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
socketio = SocketIO(app)
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1, x_prefix=1)
|
||||
socketio = SocketIO(app,cors_allowed_origins="https://lego.baerentsen.space")
|
||||
count = 0
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
|
@ -3,7 +3,7 @@ services:
|
||||
container_name: LEGOOrganizer
|
||||
build: .
|
||||
ports:
|
||||
- "5111:3333"
|
||||
- "3333:3333"
|
||||
volumes:
|
||||
- .:/app
|
||||
env_file:
|
||||
|
@ -80,7 +80,9 @@
|
||||
<script>
|
||||
|
||||
|
||||
var socket = io.connect('http://' + document.domain + ':' + location.port + '/progress');
|
||||
var socket = io.connect(window.location.protocol + '//' + document.domain + ':' + location.port + '/progress', {
|
||||
transports: ['websocket'],
|
||||
});
|
||||
// Event listener for receiving progress updates
|
||||
socket.on('update_progress', function (msg) {
|
||||
var progress = msg.progress;
|
||||
|
Loading…
Reference in New Issue
Block a user