I am using Ionic 6 with React, how can I set my http headers?
I tried doing it in the useIonViewWillEnter hook, did not work:
...
import { IonPage, useIonViewWillEnter } from "@ionic/react"
import { HTTP } from "@awesome-cordova-plugins/http"
....
const MyStuff: React.FC = () => {
useIonViewWillEnter(() => {
HTTP.setHeader(
"*",
"Content-Security-Policy",
"frame-ancestors 'self' example.com"
)
})