I recently had a problem with the Google Drive API displaying my documents. We developed a web application that connects to Google Drive accounts to extract user drive files, and then displays the file in an iframe using its embedUrl / alternateUrl.
This worked great for us in the past, but suddenly files other than Google Documents stopped displaying: html files, text files, document files ... even images!
The error I get is Refused to display 'https://docs.google.com/file/d/0B_JkNS6Wu4b5R2c0YlJSN0oyQUE/edit?usp=drivesdk' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
I understand the error, this means that Google prevents the display of documents outside the Google domain, but the question is “why suddenly now” and how to get around it.
If someone came across the same problem and found a solution, I would be glad to hear.
Thank you.
source share