Skip to content

Add support for custom headers - #20

Merged
dblock merged 1 commit into
mainfrom
custom-headers
Aug 18, 2026
Merged

dblock merged 1 commit into
mainfrom
custom-headers

Conversation

@dblock

@dblock dblock commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Closes #6.

Adds a headers option/config, alongside user_agent, that lets callers pass additional headers (Accept, Accept-Language, DNT, etc.) on every request across all three checker backends (Net::HTTP, Typhoeus::Hydra, Async::HTTP). This helps avoid 403/404 responses from sites that reject requests that look like bots.

Also fixes a small bug in LinkChecker::Async::HTTP::Headers#[]: Protocol::HTTP::Headers splits comma-separated header values into arrays, so the wrapper now joins them back into a string to match the other backends' string-valued headers.

@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Danger Report

No issues found.

View run

Adds a `headers` option/config, alongside `user_agent`, that lets
callers pass additional headers (Accept, Accept-Language, DNT, etc.)
on every request across all three checker backends. This helps avoid
403/404 responses from sites that reject requests that look like bots.

Also fixes LinkChecker::Async::HTTP::Headers#[] to join
Protocol::HTTP's array-valued headers back into a string, matching
the other backends' string-valued headers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock merged commit e6fe453 into main Aug 18, 2026
10 checks passed
@dblock
dblock deleted the custom-headers branch August 18, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure additional headers (cache-control, accept, accept-language, etc.)

1 participant