How to add Access-Control-Allow-Origin to jetty server

前端 未结 2 1533
心在旅途
心在旅途 2020-11-29 11:55

I\'ve got a jetty server to run my web services. Recently I developed a program to consume the web service and ran into Access-Control-Allow-Origin issue.

How can I

2条回答
  •  再見小時候
    2020-11-29 12:01

    The workaround for this CORS problem is to use an extension in chrome/chromium browser. here is the link for the extension.

    https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?utm_source=chrome-app-launcher-info-dialog

    No need to add any headers in the server side code(which will obviously work but may not be a good idea).

提交回复
热议问题