Skip to content

Commit

Permalink
Resolve_Security_And_Reduction_Memory_Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorURJC committed Mar 25, 2022
1 parent f75f53e commit 0451a79
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
20 changes: 19 additions & 1 deletion backend/bin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>


<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.7.0</version>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand All @@ -65,6 +71,18 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<image>
<env>
<BPE_OVERRIDE_JAVA_TOOL_OPTIONS>
-Xss256K
-XX:ReservedCodeCacheSize=64M
-XX:MaxMetaspaceSize=100000K
-Xmx64M
</BPE_OVERRIDE_JAVA_TOOL_OPTIONS>
</env>
</image>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
5 changes: 4 additions & 1 deletion backend/bin/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=update

server.error.whitelabel.enabled=false
server.error.path=/error
server.error.path=/error

spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
jwt.secret=change_me
4 changes: 2 additions & 2 deletions backend/src/main/java/app/security/RestSecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ protected void configure(HttpSecurity http) throws Exception {
// Disable CSRF protection (it is difficult to implement in REST APIs)
http.csrf().disable();

// Disable Http Basic Authentication
http.httpBasic().disable();
// Enable Http Basic Authentication
http.httpBasic();

// Disable Form login Authentication
http.formLogin().disable();
Expand Down

0 comments on commit 0451a79

Please sign in to comment.