Addes Share functionality, Added SecureWebView for Open Button.Restored Comments for QRScannerScreen
This commit is contained in:
21
components/SecureWebView.tsx
Normal file
21
components/SecureWebView.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import { WebView } from 'react-native-webview';
|
||||
|
||||
// Define the SecureWebView component
|
||||
const SecureWebView = ({ url }) => {
|
||||
return (
|
||||
<WebView
|
||||
source={{ uri: url }} // Load the URL passed as a prop
|
||||
javaScriptEnabled={false} // Disable JavaScript for security
|
||||
domStorageEnabled={false} // Disable DOM storage for security
|
||||
allowFileAccess={false} // Disable file access within the WebView for security
|
||||
originWhitelist={['*']} // Allow all origins to be loaded in the WebView
|
||||
onShouldStartLoadWithRequest={(request) => {
|
||||
// Implement additional URL filtering logic here if needed
|
||||
return true; // Return true to allow the URL to be loaded
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default SecureWebView;
|
||||
Reference in New Issue
Block a user