Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intra-App routing not working #298

Open
mikkelhegn opened this issue Dec 9, 2024 · 0 comments
Open

Intra-App routing not working #298

mikkelhegn opened this issue Dec 9, 2024 · 0 comments

Comments

@mikkelhegn
Copy link
Member

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.
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

No branches or pull requests

1 participant