-
Notifications
You must be signed in to change notification settings - Fork 881
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
Implementig cors #79
Open
Katzzer
wants to merge
14
commits into
ali-bouali:main
Choose a base branch
from
Katzzer:implementig-CORS
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Implementig cors #79
Conversation
This file contains 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
Modified the `application.yml` and `docker-compose.yml` files to use 'postgres' as the database username and password. Also changed the JPA hibernate `ddl-auto` configuration from 'create-drop' to 'update' for better consistency during development.
Incorporated PostgreSQL service to the GitHub Actions workflow for building Docker images. The setup ensures the database is ready before Maven builds, supporting integration tests. Adjusted formatting and fixed Java version specification.
Introduce a Dockerfile to containerize a Java application using OpenJDK 17 on Alpine Linux. The Dockerfile copies the JAR file from the build artifacts and sets the entry point to run the application.
Updated the ARG JAR_FILE to eliminate the 'api/' prefix, ensuring consistency with the copy command. Also added spacing in ENTRYPOINT for better readability.
Implemented a check to verify if a user with the same email already exists during registration. If a duplicate user is detected, a custom exception is thrown and an appropriate error message is returned to the client.
Updated the docker-compose.yml to use version 3.8. Added a new service named 'food-app' with its necessary configuration, including environment variables, ports, networks, dependencies, and restart policy.
Integrated the `@Slf4j` annotation to enable logging in `AuthenticationService.java` and `SecurityApplication.java`. Logging now captures user existence checks and registration token creation, replacing print statements with log entries.
Updated project version in pom.xml to 0.0.2-SNAPSHOT. Added logs to indicate the creation of 'Admin' and 'Manager' users in SecurityApplication.java. Corrected the manager's first and last name in the registration request.
Updated the `register` method in `AuthenticationController` to set the user role to `USER` by default. This ensures that all new users are assigned the `USER` role upon registration.
This commit introduces a new CorsConfig class to manage Cross-Origin Resource Sharing (CORS) settings. It allows credentials, supports all headers and methods, and specifically allows requests from "http://localhost:3000". This enhances security and flexibility in handling CORS requests.
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.
No description provided.