Skip to content

Instantly share code, notes, and snippets.

@EmadAdly
Last active July 1, 2018 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EmadAdly/fe77e210e9ba7dc55a8fb61ebf35d8b6 to your computer and use it in GitHub Desktop.
Save EmadAdly/fe77e210e9ba7dc55a8fb61ebf35d8b6 to your computer and use it in GitHub Desktop.
Chrome Deprecating Powerful Features on Insecure Origins --unsafely-treat-insecure-origin-as-secure
#For Ubuntu 16.04 LTS
#First you need to know where google-chrome is installed. To find out run:
which google-chrome
#For my case, google-chrome is installed inside both /usr/bin/google-chrome and /usr/bin/google-chrome-stable.
#I decided to use the stable version.
#Now, list the domains that you'd like chrome to treat as secure. Make sure that you have access to the folder following --user-data-dir. I used $HOME for convenience.
#Run the following command:
/usr/bin/google-chrome-stable --user-data-dir=$HOME --unsafely-treat-insecure-origin-as-secure=http://domain1.dev:8080, http://domain2.dev:8081
#This command will launch an instance of chrome deemed less secure.
#After you're done working close the instance so as to not compromise your security.
#I recommend you to save the previous command to your .bashrc file (or equivalent) by running the following:
echo -n "alias unsafechrome='/usr/bin/google-chrome-stable --user-data-dir=$HOME --unsafely-treat-insecure-origin-as-secure=http://domain1.dev:8080, http://domain2.dev:8081'" >> ~/.bashrc
#Finally, don't forget to source .bashrc, so you can comfortably call unsafechrome.
source ~/.bashrc
#For Mac OSX
open -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir=$HOME --unsafely-treat-insecure-origin-as-secure=http://domain.dev:8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment