0

I'm trying to relax Microsoft Edge CSP while running a test using proctractor (webdriver, chromedriver).

So the solution can be either

  1. flag like "--disable-csp" which dose not exist according to my search results.
  2. setting for webdriver/protractor to do so.
  3. load an extension that dose that ( Like in chrome Relaxing Chrome's CSP while running tests (webdriver) (Content-Security-policy)) I could not find any solution but to setup a proxy that filters the header.

any ideas?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Adi Darachi
  • 2,137
  • 1
  • 16
  • 29
  • 1
    Do you control the site or just the browser? You could maybe set a cookie that turns off CSP when detected? – Stephen R Dec 02 '18 at 02:32
  • @StephenR , In my case I do not control the website, but it's a great way to achieve the same results in case you do. – Adi Darachi Dec 02 '18 at 08:39

1 Answers1

0

I've settled on the best approach by taking the same approach for Chrome, using the same answer from the previous question, and just converting the Chrome extension to a Microsoft-Edge one.

  1. Follow the linked question to the point you got.
  2. Convert the Chrome extension to an Edge extension using this tool
  3. Use the extensionPath option to load the extension.
zucc0nit
  • 346
  • 3
  • 14
Adi Darachi
  • 2,137
  • 1
  • 16
  • 29