Skip to content

Commit cc0da55

Browse files
authored
Merge pull request #6 from SchmitzDan/5-response-status-is-always-set-to-200-http-ok
5 response status is always set to 200 http ok
2 parents 6d5c1e1 + aa78e8a commit cc0da55

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ experimental:
1313
plugins:
1414
cookiePathPrefix:
1515
modulename: "github.com/SchmitzDan/traefik-plugin-cookie-path-prefix"
16-
version: "v0.0.1"
16+
version: "v0.0.3" #replace with newest version
1717
```
1818
1919
### Dynamic

prefix_cookie_path.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (r *responseWriter) WriteHeader(statusCode int) {
6565
// Delete set-cookie headers
6666
r.writer.Header().Del(setCookieHeader)
6767

68-
// Add new cookie with modifies path
68+
// Add new cookie with modified path
6969
for _, cookie := range cookies {
7070
if cookie.Path == "/" {
7171
// prevent trailing /
@@ -75,4 +75,6 @@ func (r *responseWriter) WriteHeader(statusCode int) {
7575
}
7676
http.SetCookie(r, cookie)
7777
}
78+
79+
r.writer.WriteHeader(statusCode)
7880
}

0 commit comments

Comments
 (0)