License key not working for azurewebsites.net

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
|UI version|‘8.7.0’|
|Core version|‘8.7.4’|
|webviewer.min.js|‘8.7.4’|
|Build|‘Ni8xNi8yMDIzfDhhZjQyYTgwOTU=’|
|WebViewer Server|false|
|Full API|false|

Detailed description of issue
I get the watermark when opening a pdf on an app that is hosted on myapp.azurewebsites.net. I have a license key for azurewebsites.net. I’m not getting any errors regarding missing or invalid licensekeys. Same for localhost but I understand that is normal behaviour

Expected behaviour
No watermark

Does your issue happen with every document, or just one?
Every document.

Link to document
{Provide a link to the document in question if possible}

Code snippet

import getUrlFromStream from '/js/streamUtils.js';
import '/js/pdfjsviewer/lib/webviewer.min.js';

export async function loadPdf(dotNetStreamReference) {

    const pdfViewer = document.getElementById('pdf-viewer');
    pdfViewer.style.width = '100%';
    pdfViewer.style.height = '100vh';

    const pdfUrl = await getUrlFromStream(dotNetStreamReference, 'application/pdf');
    let licenseKey = getLicenseKey(); 

    WebViewer({
        path: '/js/pdfjsviewer/lib', // path to the PDF.js Express'lib' folder on your server
        licenseKey: licenseKey,
        initialDoc: pdfUrl,
    }, document.getElementById('pdf-viewer'))
        .then(instance => {
  // stuff
   });
}

getLicenseKey() gets the license key for the corresponding environment.

Hello tplogtenberg,

Are there any errors in the console or network log?

Best regards,
Tyler

Hi Tyler,

There is this warning:
addCustomModal.js:82 'setCustomModal' deprecated since version 8.5. Please use UI.addCustomModal instead

and this error:
HEAD blob:https://myapp.azurewebsites.net/86744251-03f1-40ac-9cbf-f614bea5b761 net::ERR_METHOD_NOT_SUPPORTED webviewer-core.min.js:693

and then this warning:
Extension of the document cannot be determined from URL/Path. WebViewer will assume the extension is "pdf". Use "extension" option to specify extension. E.g.

I have assumed these messages imply problems with loading the pdf and since the pdf actually loads fine I have disregarded them.

Hello tplogtenberg,

Thank you for the info,

Can you provide a screenshot of the network console specifically? I would like to see if there are any failed requests.

Also, please ensure getLicenseKey() returns the key that starts with: T3g.... as I notice you have two keys registered under your account.

Thank you,
Tyler

Hi Tyler,

This is the result of the getLicenseKey request:
-Removed because key was in the screenshot-

A screenshot of the network tab:
-Removed because key was in the screenshot-

And this is a screenshot of the console:
-Removed because key was in the screenshot-

I did notice that this request had a rather strange response:
-Removed because key was in the screenshot-

Hello tplogtenberg,

It looks like HEAD requests arent enabled by your server, can you double check if they are allowed?