前言
同事詢問有 2 個 Web AP(前台 localhost:44306,後台 localhost:59149),
結果前台的 JS 呼叫後台的 api 時,會發生 Refused to connect to 'https://localhost:59149/api..' because it violates the following Content Security Policy directive: "default-src 'self'". Note the 'connect-src' was not explicity set, so 'default-src' is used as a fallback. 的錯誤,如下,