From 31f7fc8815afdf91e9d137b517637b7930c537f5 Mon Sep 17 00:00:00 2001 From: Jan Allersma Date: Jan 20 2019 15:14:06 +0000 Subject: Remove concurrency. Fix POST url. Provide help for running on Firefox in 'README.md'. --- diff --git a/README.md b/README.md index 5120e5f..cafb47d 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,12 @@ From a UNIX terminal: chrome-browser --disable-web-security --user-data-dir="" # for chrome users chromium-browser --disable-web-securiy --user-data-dir="" # for chromium users ``` + +### Firefox + +1. Run Firefox. +2. Go to `about:config` in your browser. +3. Search for `security.fileuri.strict_origin_policy`. +4. Set it's value to `false`. + +> NOTE: Do not forget to revert the changes when you are done with the example. diff --git a/index.html b/index.html index 8ea4b2e..f79a903 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ const now = String(Math.floor(Date.now() / 1000)); const request = new XMLHttpRequest(); - request.open("POST", "http://localhost:9200/login_test/_attempts/" + now, false); + request.open("POST", "http://localhost:9200/login_test/_doc/" + now, false); //request.setRequestHeader("Origin", "http://localhost"); request.setRequestHeader("Content-Type", "application/json"); request.setRequestHeader("Access-Control-Allow-Origin", "*");//"http://localhost:9200/login_test/*"); diff --git a/package.json b/package.json index 9b80795..883da66 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "start": "npm run open", - "open": "concurrently \"http-server -a localhost -p 1234\"" + "open": "http-server -a localhost -p 1234" }, "author": "Jan Allersma", "license": "MIT",