Skip to content

Proxied URL behavior diverged from README #17

@webmonarch

Description

@webmonarch

From the README, I would expect the following proxied URLs for the various inputs:

;; wrap-proxy parameters
(wrap-proxy "/remote" "http://example.com/base")

;; I would expect the following in -> proxied URL
;; http://localhost/remote/hello.html -> 
;; http://example.com/base/hello.html
;; 
;; http://localhost/remote/dir/hello.html -> 
;; http://example.com/base/dir/hello.html

This is what I expected going in from the example (I could be wrong) + from my experience with similar functionality in nginx.

To get this example to work, the local base url parameter to wrap-proxy has to end in a / to the the URI.resolve logic to achieve my expected output:

;; NOTE: /remote/ (trailing slash vs previous)
(wrap-proxy "/remote/" "http://example.com/base")

I can submit a patch to meet my expected behavior, but is it the expected behavior?

Appreciate it!

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