Skip to content

setFetchOptionsUpdateCallback not available when bundled with a bundler #99

@RobQuincey-DC

Description

@RobQuincey-DC

This is more a question than an issue.

I'm using setFetchOptions to add a header to my request, specifically a authorization header, like so:

setFetchOptions({ headers: {"Authorization" : "bearer 1234567890"} });

When making a request, such as

const endpoint = await new WmsEndpoint(baseUrl).isReady();

The header doesn't appear to be sent with the web request. In my instance, this means the GetCapabilities request does not include the required Authorization header and I don't get the details I need.

If I switch off the web worker by calling enableFallbackWithoutWorker(), then it works and the Authorization header is appended.

Is this is a known limitation to how the web worker works or is it a bug? I'll admit to not being entirely familiar with web workers and what restrictions they may have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions