0

I'm sending this request from Angular UI:

'Accept':'multipart/form-data',
'Access-Control-Allow-Crendentails':'true',
'Access-Control-Allow-Origin':'*',
'Access-Control-Allow-Method':'POST,GET,OPTIONS,PUT',
'Access-Control-Allow-Headers':'Authorization,Content-Type'

Iv'e got the following error:

Orgin'http://localhost ' is therefore not allowed

The webserver is Apache Tomcat. How can I handle this error?

ALUFTW
  • 1,914
  • 13
  • 24
Developer
  • 1
  • 2
  • 5

1 Answers1

0

Please go through the following two links to solve your problem:

  1. Set CORS header in Tomcat
  2. How to enable CORS in apache tomcat
Saket Suraj
  • 71
  • 1
  • 1
  • 8