-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose filename header in model training api #6075
Comments
Can you post the request you're making/how you're making it? I do see the filename header returned with the request below:
header.txt contains:
|
@melindaloubser1, sure, curl or other tool like that will see custom header. But for js code in browser it won't be accessible by default. Please check this link for more info. I have prepared a demo app here, you can reproduce this yourself. It starts a simple react app, containing one button which launches model training at http://localhost:5005 and prints to browser console available response's headers: Then add the line here to configure sanic-cors:
After that much more info is available to browser: Or less broadly:
If one of options above is suitable for you I can create a PR. |
Ok that makes sense! Yes, if you could open a PR for exposing just |
@melindaloubser1 created a PR. Please check it when you have time. |
@Ezhvsalate I don't think the commit you linked to is actually part of a PR, I left a comment on it |
Add 'Access-Control-Expose-Headers' for 'filename' header (#6075)
Rasa version: Rasa 1.10.1
Python version: 3.6.9
Operating system: Ubuntu 18.04.3 LTS (Bionic Beaver)
Issue:
I train a model using HTTP /model/train API and want to get a trained model filename as response header as defined in docs.
Unfortunately it seems like I can't do this: browser doesn't see response 'filename' header.
All I get are following:
Looks like this is issue about 'Access-Control-Expose-Headers'. Can we add 'filename' to exposed headers?
The text was updated successfully, but these errors were encountered: