Skip to content

Add a configuration option to disable transforming fetch request into direct function calls #12692

@aloussase

Description

@aloussase

Describe the problem

As described here, fetch calls made during SSR can be replaced by function calls when the origin is the same as the application. This is good in many cases, but causes problems when the application is running behind a reverse-proxy and you are making an API call to another service proxied under a different path, but the same domain.

For example, I might have the following:

example.com/trivia-api -> backend api
example.com/trivia     -> svelte kit application

Requests in this case should go through the proxy in order to resolve correctly, instead of being transformed into function calls.

Describe the proposed solution

A configuration option to turn off this behaviour.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

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