carbonplan / ncview-js

https://ncview-js.staging.carbonplan.org
MIT License
4 stars 2 forks source link

Large chunk requests causes LEAP dataviewer failure #46

Open norlandrhagen opened 2 months ago

norlandrhagen commented 2 months ago

In the LEAP data catalog viewing the ARCO ERA5 data fails.

error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://ok6vedl4oj7ygb4sb2nzqvvevm0qhbbc.lambda-url.us-west-2.on.aws/storage.googleapis.com/gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3/latitude/0. 

@katamartin's ideas:

I think it’s that the request itself contains too much information. likely from all the chunking headers to cover all the variable > requests! I think we could maybe update ncview-js to dynamically pass through only the headers relevant to each request instead of defining a single chunks header that gets passed along with every request. https://github.com/carbonplan/ncview-js/blob/199ba7a2f662053f9280a871ba009b536a36424e/components/utils/data.js#L158-L166

a simple workaround in the meantime might be updating the zarr-proxy configuration client_max_body_size if that’s possible? https://stackoverflow.com/questions/18121227/how-to-avoid-request-entity-too-large-413-error