Skip to content

Commit

Permalink
fix(#23,#24) Network security config to allow http traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
piwko28 committed Oct 21, 2024
1 parent 54cd5da commit 4b66576
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ android {
applicationId "com.frigateviewer"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 17
versionName "14.2.2"
versionCode 19
versionName "14.2.3"
}
signingConfigs {
debug {
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
28 changes: 12 additions & 16 deletions android/app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config>
<!-- Localhost config is NEEDED from react-native for the bundling to work -->
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">127.0.0.1</domain>
<domain includeSubdomains="true">10.0.0.1</domain>
<domain includeSubdomains="true">localhost</domain>
</domain-config>

<domain includeSubdomains="true">my.domain.com</domain>
<trust-anchors>
<certificates src="user"/>
<certificates src="system"/>
</trust-anchors>
</domain-config>
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">*</domain>
</domain-config>

<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="user" />
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
1 change: 0 additions & 1 deletion views/report/Report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export const Report: NavigationFunctionComponent = ({componentId}) => {
await crashlytics().setAttributes(settings);
crashlytics().recordError(new Error('Reported by user'), 'reported');
formRef.current?.resetForm();
crashlytics().crash();
ToastAndroid.show(
intl.formatMessage(messages['toast.success']),
ToastAndroid.LONG,
Expand Down

0 comments on commit 4b66576

Please sign in to comment.