mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-23 05:24:28 +08:00
add backwards comptability support for extclient api for mobile
This commit is contained in:
parent
31d361e58d
commit
c9e593038e
1 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,12 @@ func userMiddleWare(handler http.Handler) http.Handler {
|
|||
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "badrequest"))
|
||||
return
|
||||
}
|
||||
if r.Method == http.MethodPost && route == "/api/extclients/{network}/{nodeid}" {
|
||||
node, err := logic.GetNodeByID(params["nodeid"])
|
||||
if err == nil {
|
||||
params["network"] = node.Network
|
||||
}
|
||||
}
|
||||
r.Header.Set("IS_GLOBAL_ACCESS", "no")
|
||||
r.Header.Set("TARGET_RSRC", "")
|
||||
r.Header.Set("RSRC_TYPE", "")
|
||||
|
|
Loading…
Add table
Reference in a new issue