File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,15 +49,15 @@ export class IframeManager {
4949 /**
5050 * Adds a domain to the trusted whitelist.
5151 *
52- * @param origin - The origin to trust (e.g., "https://coocoodaegap .com").
52+ * @param origin - The origin to trust (e.g., "https://example .com").
5353 */
5454 public addTrustedOrigin ( origin : string ) : void {
5555 if ( origin === '*' ) {
56- if ( ! import . meta . env ?. DEV )
57- throw new Error (
58- '[OmniPad-Security] Wildcard origin is not allowed. ' +
59- 'Please specify explicit origins (e.g., "https://coocoodaegap.com").' ,
60- ) ;
56+ console . error ( '[OmniPad-IPC] Using wildcard origin is UNSAFE!' ) ;
57+ console . error ( 'For production, use: addTrustedOrigin("https://example.com")' ) ;
58+ if ( ! import . meta . env ?. DEV ) {
59+ throw new Error ( 'Wildcard origin forbidden in production.' ) ;
60+ }
6161 }
6262 // 验证 origin 格式
6363 if ( ! / ^ h t t p s ? : \/ \/ / . test ( origin ) ) {
You can’t perform that action at this time.
0 commit comments