Month: October 2021

Capacitor Plugin for HTTP requests with self-signed SSL certificates

I’m using CapacitorJS for easy development with Android. I needed a way to do an HTTPS request to a box that uses self-signed SSL certificate. To accomplish it, I created my own capacitor plugin. See this wiki page for details: https://github.com/Aymkdn/assistant-freebox-cloud/wiki/Capacitor-Plugin-for-HTTP-requests-with-self-signed-SSL-certificates

Enable CORS with IIS

It’s as easy as editing the web.config file with the below: <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name=”Access-Control-Allow-Origin” value=”https://my.site.com” /> <add name=”Access-Control-Allow-Headers” value=”Authorization,Accept,Content-Type,X-Requested-With” /> <add name=”Access-Control-Allow-Credentials” value=”true” /> </customHeaders> </httpProtocol> </system.webServer> </configuration>