Blockcert-verifier headers when verifying

Anyone know where can i add headers request to blockcert-verifier serviceurl? The web i use for verifying certificates are private and it uses bearer token in headers, not token in the url

Hi @mikhatanu,

that’s a good use case and we don’t support that yet.
I assume we’d want to open that in this file: explorer-lookup/request.ts at master · blockchain-certificates/explorer-lookup · GitHub, passing the properties all the way down (from blockcerts-verifier, to cert-verifier-js, to explorer-lookup). I don’t believe it would be too complicated, but I am not sure I have the bandwidth at this point to develop that feature.

You may want to try to do it?

I don’t think i will as i don’t really understand javascript. I actually tried to set request header in that file, but i don’t see the header (in inspect element->network). Also, how do you run the blockcert-verifier in production mode? Should i just set the npm run start (in package.json) to use the production config and set the ip & port in that config?

Ok, I’ll see what I can do but there’s at least 2 weeks before I can release that

Why you don’t the headers is because everything is already packaged for you as a end user and you would have to modify the compressed sources to manage that.

To use blockcerts verifier in production you would import the js files into an HTML file and set the component in the HTML.
You can take a look at the source of blockcerts.org or there blockcerts-verifier/demo at master · blockchain-certificates/blockcerts-verifier · GitHub.

It’s probably simpler to install blockcerts-verifier with npm in your project, but you can also compile a project from the sources with npm run build.

Hope that helps

Ahh i see, so i need to add the script to the index.html in the root folder from the readme.md in production part. Thank you for the answer