2

i am trying to make login in my spring web application. I am using spring security and when i try to make login in a different IP, i get the next error:

XMLHttpRequest cannot load http://localhost:8080/OVDigital/j_spring_security_check. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.1.6:8080' is therefore not allowed access.

What i can do to solve this problem? thanks

Vítor Nóbrega
  • 1,219
  • 4
  • 26
  • 53

1 Answers1

1

This correct default behavior from security point of view. Simply put what you have to do is to implement custom CORS filter for that. Here is a simple guide how to do it.

randomUser56789
  • 936
  • 2
  • 13
  • 32