Перейти к содержимому

Solution of the Cors Error From a Spring Boot and Angular Application

The Dev World - by Sergio Lema

0:00 / 0:00

Solution of the Cors Error From a Spring Boot and Angular Application

24 378 просмотров · 3 года назад
The Dev World - by Sergio Lema
14,7 тыс. подписчиков
24 378 просмотров · 3 года назад
In this video I show how to solve the CORS error which appears at every project. I show the resolution in a Spring Boot and Angular project. I describe the problem itself and multiple options to solve it. The CORS error appears when a frontend tries to access a backend with a different URL. To solve this problem, I must configure my backend to accept a frontend from a different URL. I can also specify which HTTP methods are accepted and which HTTP Headers. The CORS error doesn't appear when both the frontend and the backend are at the same URL. This happens with a frontend deserved from a Spring Boot application. I show this behavior in the Chapter "Same Origin". This video belongs to a playlist where I develop fullstack applications using a frontend and a backend in Spring Boot:    • How to Easily Secure Your Fullstack ReactJ...   Chapters: 0:00:00 Introduction 0:02:03 Backend Creation 0:04:05 Frontend Creation 0:07:01 Same Origin 0:09:30 Annotation 0:10:04 Cors configuration My NEW eBook: https://bit.ly/46AOCU5 Github project: https://github.com/serlesen/fullstack... Blog: https://bit.ly/47ornJL LinkedIn: https://bit.ly/41Nn61q