Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
akheron committed Jan 17, 2025
1 parent badd5dd commit 23ef44a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions apigw/src/shared/test/gateway-tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,11 @@ export class GatewayTester {
return undefined
}

public async setCookie(cookie: Cookie): Promise<Cookie> {
public async setCookie(cookie: Cookie): Promise<void> {
// Cookie domain must be cleared before setting to avoid issue with "localhost"
// being in the public suffix list (and therefore denied by setCookie())
cookie.domain = null
const cookieString = cookie.cookieString()
return await this.cookies.setCookie(cookieString, this.baseUrl, {
http: cookie.httpOnly,
secure: cookie.secure,
now: cookie.creation ?? undefined,
sameSiteContext: cookie.sameSite
})
await this.cookies.setCookie(cookie, this.baseUrl)
}

public async getCookie(key: string): Promise<Cookie | undefined> {
Expand Down

0 comments on commit 23ef44a

Please sign in to comment.