I want to run this Dapp on a directory on an Apache html server.
-
I created an ‘.htaccess’ file with:
<Files “manifest.json”>
Header set Access-Control-Allow-Origin: *
Header set Access-Control-Allow-Headers: “X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding”
Header set Access-Control-Allow-Methods: “POST, GET, OPTIONS, DELETE, PUT”
<Files “index.html”>
Header set Access-Control-Allow-Origin: *
Header set Access-Control-Allow-Headers: “X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding”
Header set Access-Control-Allow-Methods: “POST, GET, OPTIONS, DELETE, PUT”
-
on file: \node_modules\blockstack\lib\auth\authApp.js
I replaced:
var redirectURI = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.origin + ‘/’;
var manifestURI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.origin + ‘/manifest.json’;
with:
var redirectURI = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.href;
var manifestURI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.href + ‘manifest.json’;
in order to see the local manifest, NOT demand a root one.
and browserified a new newbundle.js file with:
browserify lib/index.js --standalone blockstack -o newbundle.js
THEN
the app authenticates, I see Hello myid
but then REDIRECTS to root index.html of my site, which I do not want.
I appreciate any help!