Skip to content

feat: SEO improvements I#68

Merged
gocanto merged 2 commits intomainfrom
hotfix/seo-I
Sep 26, 2025
Merged

feat: SEO improvements I#68
gocanto merged 2 commits intomainfrom
hotfix/seo-I

Conversation

@gocanto
Copy link
Copy Markdown
Contributor

@gocanto gocanto commented Sep 26, 2025

Summary by CodeRabbit

  • New Features
    • Adds custom HTTP response headers for bot traffic within the sharebot path.
    • Responses now include X-Served-By: "seo-bot" and X-Debug-UA mirroring the request’s User-Agent.
    • Headers are attached before serving SEO/SPA assets to bot user-agents, aiding diagnostics and origin tracing.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds two HTTP response headers within the Caddyfile’s @sharebots handler: X-Served-By: seo-bot and X-Debug-UA: {>User-Agent}. These headers are attached when serving SEO/SPA assets to bot user-agents.

Changes

Cohort / File(s) Summary
Caddy sharebot header injection
caddy/WebCaddyfile.internal
In the handle @sharebots block, injects X-Served-By and X-Debug-UA headers before serving static SEO/SPA assets to bot user-agents.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant Bot as Sharebot UA (Client)
    participant Caddy as Caddy
    participant Assets as SEO/SPA Assets

    Bot->>Caddy: GET /... with User-Agent=bot
    alt matches @sharebots
        note over Caddy: Set headers<br/>X-Served-By=seo-bot<br/>X-Debug-UA={>User-Agent}
        Caddy->>Assets: Fetch static SEO/SPA asset
        Assets-->>Caddy: Asset content
        Caddy-->>Bot: 200 OK + headers
    else non-bot or other routes
        Caddy-->>Bot: Handle via default flow
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I hop through logs where headers glow,
A carrot stamp that bots now know.
“seo-bot” signs the cacheless sky,
And User-Agent waves “hi!”
With gentle paws I set the tag—
Debug crumbs in a tidy bag. 🥕

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hotfix/seo-I

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5fd8959 and d432a65.

⛔ Files ignored due to path filters (1)
  • public/images/profile/about-seo.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • caddy/WebCaddyfile.internal (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@gocanto gocanto changed the title Hotfix/seo i feat: SEO improvements I Sep 26, 2025
@gocanto gocanto marked this pull request as ready for review September 26, 2025 06:33
@gocanto gocanto merged commit ff1167b into main Sep 26, 2025
4 of 5 checks passed
@gocanto gocanto deleted the hotfix/seo-I branch September 26, 2025 06:34
@coderabbitai coderabbitai Bot mentioned this pull request Oct 1, 2025
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