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

Proxied URL behavior diverged from README #17

Open
webmonarch opened this issue Oct 29, 2015 · 0 comments
Open

Proxied URL behavior diverged from README #17

webmonarch opened this issue Oct 29, 2015 · 0 comments

Comments

@webmonarch
Copy link

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!

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