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

Release/secur #18

Open
wants to merge 6 commits into
base: release/movie-api
Choose a base branch
from
Open

Release/secur #18

wants to merge 6 commits into from

Conversation

Rusy13
Copy link
Collaborator

@Rusy13 Rusy13 commented Nov 4, 2024

No description provided.

.gitignore Outdated Show resolved Hide resolved
internal/app/router/router.go Outdated Show resolved Hide resolved
internal/app/secur/csrf/handlers/csrf.go Outdated Show resolved Hide resolved
internal/app/secur/csrf/handlers/csrf.go Outdated Show resolved Hide resolved
func GenerateCSRFTokenHandler(w http.ResponseWriter, r *http.Request) {
token, err := token_gen.GenerateToken()
if err != nil {
http.Error(w, "Failed to generate CSRF token", http.StatusInternalServerError)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не хватает лога об ошибки, как потом дебажить будете, если у юзера чет не так пошло

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо использовать логгер, который прикрутил Игорь

internal/app/secur/csrf/token/token.go Outdated Show resolved Hide resolved
internal/middleware/middleware.go Outdated Show resolved Hide resolved
internal/middleware/middleware.go Outdated Show resolved Hide resolved
Ugarov Ruslan Denisovich added 2 commits November 5, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants