heatseeknyc / landlord-lookup-gateway

PostgreSQL backend + REST gateway for the Landlord Lookup portal.
Other
1 stars 1 forks source link

Intermittent CORS issue on /lookup/ requests #4

Open wstlabs opened 8 years ago

wstlabs commented 8 years ago

Submits on the app stopped working today, with the following trace in the console log:

lookup.js:29 :: ajax url =[http://lookup.heatseek.org:6001/lookup/330+Broome+Street,+New+York,+NY,+United+States]
lookup.js:29 procform done.
lookup.heatseek.org/:1 XMLHttpRequest cannot load http://lookup.heatseek.org:6001/lookup/330+Broome+Street,+New+York,+NY,+United+States. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://lookup.heatseek.org' is therefore not allowed access.
lookup.js:29 :: ajax fail![object Object]

Of interest is the "No 'Access-Control-Allow-Origin' header is present on the requested resource" part.

What's strange is that we (thought) we were treating cross-origin requests properly already (using appropriate incantations from flask.ext.cors), and we've been accessing the app just fine under the new domain (in case that mattered in some way) for some time already, also.

Whatever the cause, it's blocking the app from running, so it's a very urgent bug.

wstlabs commented 8 years ago

Update -- the exceptions stopped happening (and the app is now working again), even though no changes have been made server-side. Which is still somewhat disconcerting - even though the app works.

Not sure any action is needed at this point -- but I'm going to change the subject of this ticket to something less urgent-sounding, even though we'll still consider this a "possible" bug.