Skip to content

incorrect outbound http validation blocks request if url contains '@' #2905

@rajatjindal

Description

@rajatjindal

I am trying to debug an issue with one of my spin app, and it seems like spin incorrectly blocks the outbound request if the url contains '@'

here is how my outbound http config looks like in spin.toml:

allowed_outbound_hosts = ["https://api.github.com", "https://github.com"]

and

the url I am trying to make request to is : https://api.github.com/repos/rajatjindal/spin-plugins/contents/manifests/kube/kube@0.2.0.json?ref=heads%2Fkube-v0.2.0

On trying to make this request, following error is thrown:

2024-11-05T02:13:16.254329Z ERROR spin_runtime_factors: Outbound network destination not allowed: https://0.2.0.json
Warning: A component tried to make an outbound network connection to disallowed destination 'https://0.2.0.json'.
To allow this request, add 'allowed_outbound_hosts = ["https://0.2.0.json"]' to the manifest component section.
Handler returned an error: Error::UnexpectedError("ErrorCode::HttpRequestDenied")

The source code for this sample can be found at: https://github.com/rajatjindal/spin-outbound-http-issue/

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