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,706
  • 10
  • 23
Silpa Mohan
  • 1
  • 1
  • 4

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
  • 61
  • 1
  • 8