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

兼容 OpenConnect 客户端 #62

Merged
merged 3 commits into from
Oct 28, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
兼容 OpenConnect 客户端
兼容 OpenConnect 客户端
  • Loading branch information
7357657 committed Sep 28, 2021
commit 4518959bf9ccef77552cf166fc73aebc857b13fd
2 changes: 1 addition & 1 deletion server/handler/link_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func LinkAuth(w http.ResponseWriter, r *http.Request) {
userAgent := strings.ToLower(r.UserAgent())
xAggregateAuth := r.Header.Get("X-Aggregate-Auth")
xTranscendVersion := r.Header.Get("X-Transcend-Version")
if !(strings.Contains(userAgent, "anyconnect") &&
if !((strings.Contains(userAgent, "anyconnect") || strings.Contains(userAgent, "openconnect")) &&
xAggregateAuth == "1" && xTranscendVersion == "1") {
w.WriteHeader(http.StatusForbidden)
fmt.Fprintf(w, "error request")
Expand Down