Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

400 error for assets with path /api/... #49

@ninegua

Description

@ninegua

If some asset is uploaded to the asset canister under name api/xyz, then requesting it through icx-proxy will result in 400 error, which happens on both local dfx deployment and main net.

This is because icx-proxy hard coded path api to redirect to replica in these lines

icx-proxy/src/proxy/mod.rs

Lines 157 to 158 in 4f73294

.route("/api", forward_to_replica_service.clone())
.route("/api/*path", forward_to_replica_service)

Given that /api is such a common prefix, shall we change it to something like /_/api ? Or at least give a better error message with some description of what could be going on?

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