Monday, 10 February 2020

Cross Origin Resource Sharing (Explained by Example)

Cross Origin Resource Sharing (Explained by Example)
💻 More Software engineering videos https://www.youtube.com/playlist?list=PLQnljOFTspQXOkIpdwjsMlVqkIffdqZ2K If you ever go a website and there some images you liked to reference in your page or blog. You would copy the link, and put in your blog. Only to find out that the image is broken? You copy the link again and paste it in URL and it opens fine? This is an effect of CORS or Cross Origin Resource Sharing. In this video, we will discuss the main errors that you get as a result of CORS and we will fix them by Example. Jump codes for your convenient 03:00 Direct same origin access 04:00 CORS Policy Error #1 - No 'Access-Control-Allow-Origin' header is present 08:10 CORS Policy Error #2 - The ‘Access-Control-Allow-Origin' header has a different value from the origin 10:10 CORS Policy Error #3 - OPTIONS 405 Method not Allowed (Preflight failed) 17:00 CORS Policy Error #4 - Response to preflight request did not pass No 'Access-Control-Allow-Origin' header is present 19:00 CORS Policy Error #5 - Request header field “Content-Type” is not allowed Stay Awesome! Hussein
via YouTube https://youtu.be/Ka8vG5miErk