Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
Permit user installed root certificates in Android
Browse files Browse the repository at this point in the history
- Add permission to use user installed root certificates to AndroidManifest.xml
- Remove not needed and not existing rejectUnauthorized options for axios
  • Loading branch information
chrbayer committed Dec 25, 2018
1 parent 0e75121 commit 4a15ba6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
Expand Down
9 changes: 9 additions & 0 deletions android/app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<certificates src="system"/>
<certificates src="user"/>
</trust-anchors>
</base-config>
</network-security-config>
2 changes: 0 additions & 2 deletions src/API/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export class API {
baseURL: `${this.credentials.server}/index.php/apps/passwords`,
timeout: 2 * 60 * 1000,
headers: { 'OCS-APIRequest': 'true' },
rejectUnauthorized: false,
auth
})

Expand Down Expand Up @@ -90,7 +89,6 @@ export class API {
baseURL: `${this.credentials.server}`,
timeout: 10 * 1000,
headers: { 'OCS-APIRequest': 'true' },
rejectUnauthorized: false,
auth: {
username: this.credentials.user,
password: this.credentials.password,
Expand Down

0 comments on commit 4a15ba6

Please sign in to comment.