A Cloud Guru: AWS Solution Architect Associate Course — Polly Lab ‘error’

Tocacar
Technical Blog
Published in
1 min readDec 29, 2017

If you’re still a die hard fan of FireFox, despite the popularity of Chrome in the developer community, and you’re working your way through the A Cloud Gurus AWS Solution Architect Associate course, you’re going to run into a frustrating ‘error’ dialogue when you feverishly try out the results of the two-part Polly lab.

When you reach the end of the second video, the results of your labour are finally displayed — a nice orange interface that lets you input some text then click ‘Say it!’. In FireFox, this results in a JS dialogue that says ‘error’. The reason is:

“Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://my-api-endpoint-url. (Reason: missing token ‘x-requested-with’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel).”

In the lab, you apply CORS to the API via a button, so it’s not immediately obvious how to amend this. An earlier lab does cover it however (I’m running out of battery so will update this post later with instructions). To keep things moving for the immediate timebeing though, you can just re-try your website in Edge or probably Chrome and not get the error.

--

--