Skip to content

Any solution for use custom httpHeaders? #11792

@zhuangzhuang

Description

@zhuangzhuang

Attach (recommended) or Link to PDF file here:

Configuration:

  • Web browser and its version:
  • Operating system and its version:
  • PDF.js version:
  • Is a browser extension:

Steps to reproduce the problem:

  1. on file viewer.js

    event.initCustomEvent("webviewerloaded", true, true, {});

    listen event and motify appOptions

  2. on file app.js

    const apiParameters = AppOptions.getAll(OptionKind.API);
    get config for api

  3. but app_options.js has not option for httpHeaders ,

    function getDocument(src) {
    support this option

What is the expected behavior? (add screenshot)

suport custom httpHeader for viewer.js
i can only hook xhr, fetch for hack this moment.

What went wrong? (add screenshot)

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

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