electron/lib/renderer
Jerry Wu dee331519c fix: disable nodeIntegration & insecure resource warnings for localhost (#18814)
* fix: disable remote host nodeIntegration warning for localhost

In warnAboutNodeWithRemoteContent(), add a check to see if the hostname
is "localhost" and prevent the warning message if it is.

* fix: disable loading insecure resources warning for localhost

In warnAboutInsecureResources(), filter out resources from localhost
since they are most likely not a threat.

* test: add tests for ignoring security warnings when using localhost

Add tests for ignoring warning messages for the following scenarios:
  1. node integration with remote content from localhost
  2. loading insecure resources from localhost

* test: fix insecure resource test

* test: pass nodeIntegration with remote test on did-finish-load

* test: maybe fix node integration test (error w/ conv circular struct)

* test: update test description

* test: use "load" event to check when nodeIntegration test has finished

Instead of relying on the "did-finish-load" event, which may result in
a race condition, add an "onload" handler that logs "loaded" to the
console. This will execute _after_ the nodeIntegration check, so it
can be safely used as a signal to indicate that the test is done.

* test: rename base-page-security-load-message.html

* fix: ignore enabled remote module warning for localhost

* refactor: add isLocalhost()
2019-07-02 19:36:50 +09:00
..
api refactor: re-implement desktop-capturer in TypeScript (#18580) 2019-06-15 19:44:18 +09:00
extensions chore: convert extension apis to TypeScript (#18688) 2019-06-14 07:52:24 -07:00
web-view feat: make async webContents / <webview> methods return a Promise (#18792) 2019-06-17 12:10:02 +03:00
callbacks-registry.ts chore: convert callbacks-registry to ts (#18682) 2019-06-15 17:18:25 +09:00
chrome-api.ts chore: convert extension apis to TypeScript (#18688) 2019-06-14 07:52:24 -07:00
content-scripts-injector.ts refactor: piggy-back on ELECTRON_BROWSER_SANDBOX_LOAD to get content scripts (#18823) 2019-06-19 17:23:44 +02:00
init.ts fix: do not remove node globals when context isolation is enabled (#18967) 2019-06-28 14:37:00 -07:00
inspector.ts refactor: make ELECTRON_INSPECTOR_CONTEXT_MENU handler async (#17411) 2019-03-19 10:37:43 -07:00
ipc-renderer-internal-utils.ts refactor: add ipcMainUtils.invokeInWebContents / ipcRendererUtils.handle helpers (#17313) 2019-03-13 12:03:17 -07:00
ipc-renderer-internal.ts refactor: use mojo for electron internal IPC (#17406) 2019-04-02 15:38:16 -07:00
security-warnings.ts fix: disable nodeIntegration & insecure resource warnings for localhost (#18814) 2019-07-02 19:36:50 +09:00
web-frame-init.ts feat: promisify executeJavaScript (#17312) 2019-03-14 12:08:54 -07:00
webpack-provider.ts refactor: bundle the browser and renderer process electron code (#18553) 2019-06-02 13:03:03 -07:00
window-setup.ts refactor: use the URL api to resolve urls in window setup (#18611) 2019-06-05 10:21:06 -07:00