Submitted:
15 May 2025
Posted:
16 May 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Literature Review
3. Methods
3.1. Experimental Setup
- Basic CORS configuration with allowedOrigins("*") and allowCredentials(true).
- Controlled CORS configuration with specified allowed origins and restricted methods.
3.2. Preflight Requests and Performance Testing
4. Technical Implementation
4.1. Spring Boot CORS Configuration
4.1.1. Global CORS Configuration

4.1.2. Controller-Level CORS Configuration

4.2. Preflight Requests Handling


4.3. Security Configuration with Spring Security

5. Results
5.1. Security Analysis
5.2. Performance Analysis
6. Conclusions
References
- Mozilla. (n.d.). Cross-origin resource sharing (CORS). MDN Web Docs. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS.
- Spring Team. (n.d.). Spring Boot reference documentation. Spring. https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/.
- Djaber, Y. (2023). Understanding and preventing CORS misconfiguration. Vaadata Blog. https://www.vaadata.com/blog/understanding-and-preventing-cors-misconfiguration/.
- OWASP. (n.d.). CORS origin header scrutiny. OWASP. https://owasp.org/www-community/attacks/CORS_OriginHeaderScrutiny.
- Apache. (n.d.). Apache JMeter user’s manual. https://jmeter.apache.org/usermanual/index.html.
- PortSwigger. (n.d.). Cross-site request forgery (CSRF). PortSwigger Web Security Academy. https://portswigger.net/web-security/csrf.
- Pixel QA. (2023). How to perform pen testing with OWASP ZAP. https://www.pixelqa.com/blog/post/how-to-perform-pen-testing-with-owasp-zap.
- Stack Overflow. (2016, May 1). How to configure CORS in a Spring Boot Spring Security application. https://stackoverflow.com/questions/36968963/how-to-configure-cors-in-a-spring-boot-spring-security-application.
- Spring. (n.d.). Spring Security. https://spring.io/projects/spring-security.
- Mozilla. (n.d.). Preflight request. MDN Web Docs. https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).