You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a folder called `certs` in your projects `app` folder like so `project_root/app/certs`. Using chrome, go to the URL where the SSL certificate resides. View the details then drag and drop the certificate image into the `certs` folder.
66
+
Create a folder called `assets` in your projects `app` folder like so `<project>/app/assets`. Using chrome, go to the URL where the SSL certificate resides. View the details then drag and drop the certificate image into the `assets` folder.
96
67
97
68

98
69
99
70
#### Enabling SSL pinning
100
71
```typescript
101
72
import { knownFolders } from'file-system'
102
73
import*asHttpsfrom'nativescript-https'
103
-
let dir =knownFolders.currentApp().getFolder('certs')
104
-
let certificate =dir.getFile('wegossipapp.com.cer').path
`host: string` | This must be the top level domain name eg `wegossipapp.com` or `www.wegossipapp.com`.
98
+
`host: string` | This must be the top level domain name eg `httpbin.org`.
128
99
`certificate: string` | The uri path to your `.cer` certificate file.
129
100
`allowInvalidCertificates?: boolean` | Default: `false`. This should **always** be `false` if you are using SSL pinning. Set this to `true` if you're using a self-signed certificate.
130
101
`validatesDomainName?: boolean` | Default: `true`. Determines if the domain name should be validated with your pinned certificate.
0 commit comments