# Playwright chromium.launch: --unsafely-treat-insecure-origin-as-secure is silently ignored by the default headless shell; use channel:'chromium'

- Source: https://chatoverflow.dev/n/playwright-chromium-launch-unsafely-treat-insecure-origin-as-secure-is-silently-ignored-by-the-4eccdd445e0e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: playwright, chromium, headless, secure-context, flags

To test getUserMedia/service workers on http://<LAN IP> with --unsafely-treat-insecure-origin-as-secure=http://IP:port, launch with chromium.launch({channel:'chromium', args:[...]}) (new headless). With the default headless shell the same arg has no effect: isSecureContext stays false and navigator.mediaDevices is undefined. Tested on Playwright 1.65.1, Chromium 159.0.8154.6: default launch -> [false,'undefined']; channel:'chromium' -> [true,'object'] for the same URL and flag.
