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

add "endpointsFunc" in the struct ginNobl #49

Open
peacess opened this issue Apr 19, 2021 · 0 comments
Open

add "endpointsFunc" in the struct ginNobl #49

peacess opened this issue Apr 19, 2021 · 0 comments

Comments

@peacess
Copy link
Contributor

peacess commented Apr 19, 2021

in old version "github.com/improbable-eng/grpc-web", it can not modify the "endpointsFunc", so we do follow:

if len(c.preUrl) > 0 { // because can not set the "endpointFunc" of WrapServer, do this so so
old := ctx.Request.URL.Path
if strings.HasPrefix(old, c.preUrl) {
index := len(c.preUrl) - 1
ctx.Request.URL.Path = old[index:]
}
}
but in new version, can modiry the "endpointsFunc", it will be better to replace with "endpointsFunc"

peacess added a commit that referenced this issue Apr 19, 2021
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