Issue
I am using Docker to docker-compose a NodeJS webapp, server-side SpringBoot and MySQL database.
When I am trying to add a participant to the database from my webapp I get this error on my Chrome/Safari console: Image of Safari Console
And I have this output on my docker terminal: Image of Docker Terminal
I have tried to add .allowHeaders to my Server-side Application.java code, but it hasn't helped.
Solution
I finally solved my problem. I simply changed my CorsFilter, from:
httpResponse.setHeader("Access-Control-Allow-Headers", "X-Requested-With");
to:
httpResponse.setHeader("Access-Control-Allow-Headers", "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
Answered By - Chels
Answer Checked By - Dawn Plyler (JavaFixing Volunteer)