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

Incorrect routing when using a nested URL with routePrefix #17

Description

@backcopy

When setting a nested URL through another web server (per best practice) litecore node is incorrectly setting the route URL as root while building the route prefix, see below:

https://github.com/litecoin-project/litecore-node/blob/be0cd40ef806dfdf020d2918e3fab80f022e135b/lib/services/web.js#L106

This will break any complex setup where a reverse proxy or firewall is set infront of litecore node.

The patch should take into account the possibility of a nested URL when building the prefix. I don't have a PR for this right now but a rough hot patch for existing services would look something like:

this.app.use('/deep/nested/' + this.node.services[key].getRoutePrefix(), subApp); 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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