feat: implementation of csrf, csp and secure cookies#194
Merged
Conversation
Member
|
todo: zdjęcia usosa |
Rei-x
reviewed
Feb 11, 2025
Rei-x
reviewed
Feb 12, 2025
| }: { | ||
| url: string; | ||
| method: RequestInit["method"]; | ||
| body?: string | null; |
Member
There was a problem hiding this comment.
tutaj mogłeś dać dowolny obiekt i potem w środku robić JSON.stringify, fajnie by działało myślę @qamarq
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the backend and frontend configurations, primarily focusing on adding security features and updating dependencies. The most important changes include the addition of the AdonisJS Shield package for enhanced security, modifications to the CORS configuration, and updates to the package-lock.json file to reflect new dependencies.
Backend Configuration Changes:
Added AdonisJS Shield package to enhance security by configuring CSP, CSRF, and other security policies. (
backend/adonisrc.ts,backend/config/shield.ts,backend/package-lock.json,backend/package.json,backend/start/kernel.ts) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]Updated CORS configuration to dynamically set the allowed origins based on environment variables. (
backend/config/cors.ts) [1] [2]Frontend Configuration Changes:
Added
sameSite: "strict"attribute to cookies for enhanced security. (frontend/src/app/api/callback/route.ts,frontend/src/app/api/login/route.ts) [1] [2]Modified the logout function to use a custom
fetchToAdonismethod and delete additional cookies. (frontend/src/actions/logout.ts) [1] [2]Included nonce in the analytics script tag for enhanced security. (
frontend/src/app/layout.tsx) [1] [2] [3]Other Changes:
Updated
robots.txtto disallow crawling of certain paths. (frontend/public/robots.txt)Minor syntax changes to remove semicolons in import statements. (
backend/adonisrc.ts,backend/start/kernel.ts) [1] [2] [3] [4] [5]