Skip to content

Commit

Permalink
Allowing CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
NarayanAdithya committed Jun 17, 2022
1 parent b4db1be commit 45a218d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


#SocketIO Init
socketio.init_app(app)
socketio.init_app(app, cors_allowed_origins="*")

#Blueprine Registration
from app.auth import auth
Expand Down
1 change: 1 addition & 0 deletions app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<script type="text/javascript" charset="utf-8">
var socket;
$(document).ready(function(){
console.log('https://' + document.domain + ':' + location.port + '/bot/chat');
socket = io.connect('https://' + document.domain + ':' + location.port + '/bot/chat');
socket.on('received_message',function(msg){
console.log(msg.data[0].text);
Expand Down

0 comments on commit 45a218d

Please sign in to comment.