OpenWaterFoundation / owf-app-snodas-ng

Open Water Foundation SNODAS snowpack user interface built with Angular
0 stars 0 forks source link

Get data from State server #9

Closed Nightsphere closed 3 years ago

Nightsphere commented 3 years ago

Right now a sizable chunk of the graphs shown are retrieved from the State server, but a significant amount is still used from the local testing data. This includes

Convert these to only using the server. Unfortunately, CORS is preventing the GET request, and everything I've found so far is implying it is a server-side issue, or offers work arounds that don't seem a robust solution:

smalers commented 3 years ago

Josh:

Is this what needs to be done?

https://cloud.google.com/storage/docs/configuring-cors

Nightsphere commented 3 years ago

I believe all that needs to be done is:

[
    {
      "origin": ["*"],
    }
]

This should allow everything.

smalers commented 3 years ago

I added the set-gcp-cors-sh script to set the CORS settings on the GCP bucket. The setting needed to also set the method to GET.

smalers commented 3 years ago

Things seem to be working. I'm closing this issue.