Skip to content

Intra-App routing not working #298

Closed
@mikkelhegn

Description

@mikkelhegn

The following method of calling a route within a Spin app written in JS/TS does not work: https://developer.fermyon.com/spin/v2/http-outbound#intra-application-http-requests-by-route

It looks like the call is using the host-name that spin up is binding to - e.g., http://localhost:3001, which causes the following error, even with having allowed_outbound_hosts = ["http://self", "https://self"] in spin.toml

const response = await fetch("/back");
2024-12-09T08:40:17.797984Z ERROR spin_runtime_factors: Outbound network destination not allowed: http://localhost:3001
Warning: A component tried to make an outbound network connection to disallowed destination 'http://localhost:3001'.
To allow this request, add 'allowed_outbound_hosts = ["http://localhost:3001"]' to the manifest component section.

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