Skip to content
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

Download using FileDownloader fails with Chrome / IE11, succeeds with Firefox #9100

Closed
cyrilmhansen opened this issue Apr 18, 2017 · 2 comments
Milestone

Comments

@cyrilmhansen
Copy link

Using Vaadin 7.7.7, our application use a dynamically generated StreamSource.

Using Chrome, the brower seems to starts the download and immediately display a status 'Network error'.

In the dev console, the request appear in red, and the console contains these errors 👍

Refused to display 'http://127.0.0.1:8000/XXX/XXX/.xlsx' in a frame because it set 'X-Frame-Options' to 'deny'.
com.vaadin.DefaultWidgetSet-0.js:2161 GET http://127.0.0.1:8000/XXX/XXXX.xlsx net::ERR_BLOCKED_BY_RESPONSE

With IE 11, the download does not start, I haven't found any error message.

With Firefox the download proceed as expected.

Any clues ?

@Legioth
Copy link
Member

Legioth commented Apr 19, 2017

Might be related to the X-Frame-Options error message. The framework isn't setting any such headers, so it might be something that is set as part of your application?

If that is the case, then it might be interesting to see what would happen if you would remove that header. I wouldn't suggest that you permanently remove it since there are good reasons for having it, but it would be good to determine whether it's actually related to this issue.

@cyrilmhansen
Copy link
Author

cyrilmhansen commented Apr 19, 2017

Yes indeed, the header was added by default by spring security (I don't use spring-boot). If I add this xml configuration snippet the download is ok with chrome :

<security:headers>
                       <security:frame-options disabled="true"></security:frame-options>
....

@hesara hesara added this to the Invalid milestone Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants