hackoregon / civic-devops

Master collection point for issues, procedures, and code to manage the HackOregon Civic platform
MIT License
11 stars 4 forks source link

2017 Housing project map api link broken #207

Open meganmckissack opened 6 years ago

meganmckissack commented 6 years ago

The 2017 Housing project map component can't receive API calls. I'm unsure if it's a CORS issue or that the link needs to be redirected after the API endpoints DNS changes.


housing:1 Failed to load http://service.civicpdx.com/housing/affordable?format=json&demographic=Avg.%20Portland%20Household&housing_size=Homeownership: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://civicpdx.org' is therefore not allowed access. The response had HTTP status code 503. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.```
jaronheard commented 6 years ago

It looks there is at the very least a CORS issue, and it's also causing other issues across the 2017 projects.

Opening the console at http://2017.civicpdx.org/housing reveals a number of CORS errors, but also other errors.

MikeTheCanuck commented 6 years ago

I can suggest that the quickest way to fix this for the Housing project would be to switch from http://service.civicpdx.com

to

http://service.civicpdx.org

in all the API requests.

I don't recall making any specific changes recently that would've made .com requests harder, but I also know that I've been assuming that only the .org DNS and URLs are actively in use. There was thinking at one time that we'd support both, but with the benefit of hindsight there's little benefit to this, and pretty clearly a dependency we no longer support.

See https://github.com/hackoregon/civic-devops/issues/187 for additional thoughts on the .com zone.