Skip to content

Commit

Permalink
debugging cors issues for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
n1lby73 committed Dec 8, 2023
1 parent 4d22e5d commit bedf64f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion web-ui/webApp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@
jwt = JWTManager(app)
login = LoginManager()
migrate = Migrate(app, db)
socketio = SocketIO(app, cors_allowed_origins=['http://127.0.0.1:5000', 'https://impedo.serveo.net', 'wss://industrialiot.onrender.com', 'https://industrialiot.onrender.com', 'http://localhost:3000', 'localhost:3000', 'http://serveo.net:4565', 'serveo.net:4565'])
socketio = SocketIO(app, cors_allowed_origins=['http://127.0.0.1:5000','http://127.0.0.1:5500', '127.0.0.1:5500' 'https://impedo.serveo.net', 'wss://industrialiot.onrender.com', 'https://industrialiot.onrender.com', 'http://localhost:3000', 'localhost:3000', 'http://serveo.net:4565', 'serveo.net:4565'])
# socketio = SocketIO(app, cors_allowed_origins='*', transports=['websocket', 'xhr-polling'])

# Use CORS for regular HTTP routes
CORS(app, resources={r"/api/*": {"origins": [
'http://127.0.0.1:5000',
'http://127.0.0.1:5500',
'http://impedo.serveo.net',
'https://industrialiot.onrender.com',
'http://localhost:3000',
'http://serveo.net:4565'
]}})

from webApp import routes, apiRoute

0 comments on commit bedf64f

Please sign in to comment.