-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add /logout path to delete cookies (#8)
- Loading branch information
1 parent
03d4eb0
commit 4147247
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package proxy | ||
|
||
import ( | ||
_ "embed" //embed web resources for login page | ||
"fmt" | ||
"net/http" | ||
) | ||
|
||
// logoutGetHandler delete auth cookies | ||
func logoutGetHandler(w http.ResponseWriter, r *http.Request) { | ||
|
||
// Call token cookie deletion helper | ||
err := deleteTokenCookie(w, r) | ||
if err != nil { | ||
fmt.Printf("deleting token cookie: %s\n", err) | ||
w.WriteHeader(http.StatusInternalServerError) | ||
return | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters