blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
See original GitHub issueRasa version: 1.3.2
Rasa X version (if used & relevant):
Python version:3.6
Operating system (windows, osx, …): Windows 10
Issue:
We are not able to connect MR.bot widget with rasa using socketio.
I had faced the same issue in rasa = 1.2.0 but after downgrading the python-engineio==3.8.1 .
After seeing a lot of articles that this issue is fixed in the new version. I tried to install the rasa =1.3.2
but the issue is same and looks like it’s not fixed. Could anybody please help?
Mr bot script
<script>
WebChat.default.init({
selector: "#webchat",
initPayload:
"/get_started",
interval: 1000,
socketUrl: "http://localhost:5005",
socketPath: "/socket.io/",
title: "Chat ",
subtitle: "",
inputTextFieldHint: "Type a message...",
connectingText: "Waiting for server...",
hideWhenNotConnected: false,
fullScreenMode: false,
profileAvatar: "Images/User.png",
openLauncherImage:
"",
closeLauncherImage: "",
params: {
images: {
dims: {
width: 300,
height: 200,
}
},
storage: "session"
}
});
</script>
Credentials.yml
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true
Error (including full traceback): Access to XMLHttpRequest at ‘http://localhost:5005/socket.io/?EIO=3&transport=polling&t=MqhDu8m’ from origin ‘http://localhost:3073’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Command or request that led to error:
rasa run -m models --credentials credentials.yml --cors '*'
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
No we are using rasa only .
Get Outlook for Androidhttps://aka.ms/ghei36
From: Ella Rohm-Ensing notifications@github.com Sent: Monday, September 16, 2019 10:27:57 PM To: RasaHQ/rasa rasa@noreply.github.com Cc: Piyush Kumar piyush29kumar@hotmail.com; Author author@noreply.github.com Subject: Re: [RasaHQ/rasa] blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource (#4459)
It shouldn’t be an issue in production, you can also secure the API with a token so that there aren’t any erroneous requests coming in. Are you using Rasa x at all? If so, there currently isn’t a version that runs on Rasa>=1.3
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/RasaHQ/rasa/issues/4459?email_source=notifications&email_token=ACQHJZHBWNYYVRL35YGLIZLQJ63JLA5CNFSM4IWRWT4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ZZY6I#issuecomment-531864697, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACQHJZBS4QTDUTEDQFEZGZ3QJ63JLANCNFSM4IWRWT4A.
closed in https://github.com/RasaHQ/rasa/pull/4521