Skip to content

Allow setting the Referer header - #16

Open
adriaanzon wants to merge 1 commit into
mainfrom
referer-header
Open

Allow setting the Referer header#16
adriaanzon wants to merge 1 commit into
mainfrom
referer-header

Conversation

@adriaanzon

@adriaanzon adriaanzon commented Aug 17, 2026

Copy link
Copy Markdown
Member

Add a Connection::setReferer() method that sends the configured URL as the Referer header on every request, so API consumers can identify themselves for diagnostics.

Summary by CodeRabbit

  • New Features

    • Added optional Referer URL support for generated requests.
    • Requests include the configured Referer header when provided.
    • Referer headers remain omitted by default.
  • Chores

    • Updated the connection component version to 3.1.0.

@adriaanzon
adriaanzon requested a review from dbarneveld August 17, 2026 12:44
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 84f60ff5-c1c6-4a36-a78b-168957e57ede

📥 Commits

Reviewing files that changed from the base of the PR and between 773194b and 51637d7.

📒 Files selected for processing (2)
  • src/Connection.php
  • tests/ConnectionTest.php

Included review availability: 4 reviews are currently available. Based on recent review activity, included reviews refill at 5 per hour.


📝 Walkthrough

Walkthrough

The connection version is updated to 3.1.0. Connections can store an optional Referer URL. Generated requests include the Referer header only when configured. Tests cover the default and configured behaviors.

Changes

Referer Header Support

Layer / File(s) Summary
Referer API and state
src/Connection.php
The SDK version changes to 3.1.0. Connection stores a nullable Referer value and provides the fluent setReferer() method.
Referer request integration
src/Connection.php, tests/ConnectionTest.php
Generated requests add the Referer header when configured. Tests verify its default absence and configured inclusion.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 51637

This PR adds configurable Referer headers for requests and includes corresponding tests; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: dbarneveld

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding support for setting the Referer header through the new Connection API.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

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.

1 participant