Skip to content

server functions not getting correct headers on initial load #3192

Description

@noah-wardlow

Which project does this relate to?

Start

Describe the bug

as of 1.95.7, you could call getHeader("host") from a server function and it would give the full domain: eg: subdomain.localhost:3000,

after 1.96, the host the only returns as localhost:3000

oddly, if you router.invalidate() lower in the app, it will return the full headers

Your Example Website or App

n/a

Steps to Reproduce the Bug or Issue

  1. call a server function from a subdomain
  2. in that server function collect the headers
  3. see that the headers have the incorrect host

Expected behavior

As a user I'd expect the correct host headers from where the server is function is called

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

mac os
chrome
version 1.97.2

Additional context

No response

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