I get access denied when making a request for datasourceservlet

306 views
Skip to first unread message

vipul

unread,
Jun 30, 2009, 1:15:46 PM6/30/09
to Google Visualization API
I get the following response.

google.visualization.Query.setResponse
({version:'0.6',status:'error',errors:
[{reason:'access_denied',message:'Access
denied',detailed_message:'Unauthorized request. Cross domain requests
are not supported.'}]});

Any ideas what I might be missing...

ChartMan

unread,
Jul 1, 2009, 5:07:58 AM7/1/09
to google-visua...@googlegroups.com
It seems that you are sending a Query with xhr to another domain.
If you send an example page I can try and give you more details.

ChartMan

ChartMan

unread,
Dec 26, 2009, 2:28:05 PM12/26/09
to google-visua...@googlegroups.com
The data source default implementation assumes that all requests are for the same domain. You can change that if you like but then you are exposing your data to XSSI attack. It's not that bad but a vulnerability you should be aware of.

I think your access denied errors are related but if not please provide with more details.

ChartMan

On Fri, Nov 20, 2009 at 7:34 PM, miguel <mig...@di.uminho.pt> wrote:
Hi,

I'm getting the same kind of error when I implement my own
DataSourceServlet.
If I setup tomcat's servlet to use the CsvDataSourceServlet class from
the examples everything works fine and I get a proper response in my
browser.
However, if I use a class I built myself I always get :

google.visualization.Query.setResponse
({version:'0.6',status:'error',errors:
[{reason:'access_denied',message:'Access
denied',detailed_message:'Unauthorized request. Cross domain requests
are not supported.'}]});

Any clues to what is going on?

Thanks in advance,
Miguel

On Jul 1, 10:07 am, ChartMan <chart...@google.com> wrote:
> It seems that you are sending a Query with xhr to another domain.
> If you send an example page I can try and give you more details.
>
> ChartMan
>

Sandeep Burman

unread,
May 27, 2017, 7:56:00 PM5/27/17
to Google Visualization API
Although this post is very old but still I am posting a reply so that others can see the resolution.
If you are working in local development environment then override the following method in your custom DataSourceServlet

@Override
protected boolean isRestrictedAccessMode() {
    return false;
  }

}

Thanks,
Sandeep Burman
Reply all
Reply to author
Forward
0 new messages