Jetty Cross Origin Filter

前端 未结 5 1865
故里飘歌
故里飘歌 2020-12-04 15:36

I\'ve configured Jetty\'s cross origin filter, but I continue to get the following error. Does anyone know what is wrong and how to fix it? Below the error message is my ove

5条回答
  •  旧时难觅i
    2020-12-04 16:10

    I had the same Problem with ActiveMQ Ajax within Jetty Web Server. My Problem was, that the allowed headers field is not accepting a wildcard in form of "*".

    For getting ActiveMQ Ajax to work, i also have to add the "Options" Method to the allowedMethods.

    Cross-Origin Filter from web.xml:

    
       cross-origin
       org.eclipse.jetty.servlets.CrossOriginFilter
       
           allowedOrigins
           *
       
       
           allowedMethods
           GET,POST,OPTIONS,DELETE,PUT,HEAD
       
       
           allowedHeaders
           origin, content-type, accept, authorization
       
     
     
         cross-origin
         *
     
    

提交回复
热议问题