open HTML-Report in a browser

181 Views Asked by At

how can a open the sophos-report in a new browser tab? I upload a file to static file analysis with nodejs. I have a access token the jobId and the url. But when I open the url for the html-report I become: error "unauthorized" So I have to use the authorization token to access the page in the browser. But how?

thank for help

2

There are 2 best solutions below

1
penguine On

I was confused because:

We're sorry but the report doesn't work properly without JavaScript enabled. Please enable it to continue.

so I think, when I save the reports it couldn´t work correct.

now I save the report and it work´s fine. It seems you do not need javascript. And so I don´t need a URL authentisation string.

0
László Ács On

You must authenticate yourself to obtain the HTML report. After that you can serve the returned HTML document (which is the body of the previous API call) as the HTML page, a downloadable file or you could embed it into you HTML page as an HTML object.

For rendering the report you need JavaScript enabled. It means that the tool used for rendering the returned HTML report was not supporting JavaScript.