-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,6 +257,7 @@ func (r *Router) routeCommon(req *logical.Request, existenceCheck bool) (*logica | |
originalPath := req.Path | ||
req.Path = strings.TrimPrefix(req.Path, mount) | ||
req.MountPoint = mount | ||
req.MountType = re.mountEntry.Type | ||
if req.Path == "/" { | ||
req.Path = "" | ||
} | ||
|
@@ -304,6 +305,7 @@ func (r *Router) routeCommon(req *logical.Request, existenceCheck bool) (*logica | |
defer func() { | ||
req.Path = originalPath | ||
req.MountPoint = "" | ||
req.MountType = "" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
joelthompson
Author
Contributor
|
||
req.Connection = originalConn | ||
req.ID = originalReqID | ||
req.Storage = nil | ||
|
1 comment
on commit 91a1ad7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right about that comment, but, the router is the right place to attach that info and for future reasons it will be useful to have in the core after the call!
This looks good, but, for reasons, can you actually replace the values of MountPoint and MountType here with the values from
re.mountEntry.Type
andmount
? So the values carry back to the core logic but with known good values.