Funcy-ICT / Funcy-ICT/Funcy_Portfolio_Backend

[bug] サーバーデプロイ時にCookieがセットされない

Open
#96 0 comments 0 reactions 2 assignees Claimed by @KeitaOsaki View on GitHub
bug
Dominant language
Go
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## 機能概要
- GCPなどのサーバー環境化にデプロイした時でも、Cookieがセットされるようにする
## Taskリスト
- Cookieのセット部分を書き換える
```
cookie := &http.Cookie{
Name: "token",
Value: token,
HttpOnly: true,
}

cookie := &http.Cookie{
Name: "token",
Value: token,
HttpOnly: true,
SameSite: http.SameSiteNoneMode,
Secure: true,
}
```
## Doneの定義
- GCPなどのサーバー環境化にデプロイした時でも、Cookieがセットされるようにする(フロントからもheaderにcookieが含まれるようにする)
## 参考リンク
- https://zenn.dev/shun_sakai/scraps/2e11d72173fff0
- https://qiita.com/ahera/items/0c8276da6b0bed2b580c#samesite%E3%81%A8%E3%81%AF
## 留意事項
- 可能であればフロントとサーバーで同一ドメインにするのが望ましいが、たぶん無理(ドメイン合わせるのも難しいし、localhostとかの設定も面倒くさい)
## 検討事項
- jwtへの移行...?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.