Skip to content

Commit 65e8e1d

Browse files
committed
API_LIST and csrf settings
const API_LIST inside API.js set to relative endpoint, instead of absolute const API_LIST = ‘/todolist’; Add csrf.disable inside WebSecurityConfiguration.java line inside configure(…) method httpSecurity.csrf().disable();
1 parent a88e64e commit 65e8e1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

MtdrSpring/backend/src/main/frontend/src/API.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
* https://petstore.swagger.io/
1414
1515
*/
16-
// const API_LIST = 'http://localhost:8080/todolist';
1716
// Copy from the endpoint from the API Gateway Deployment
1817
// Example: const API_LIST = 'https://di2eyonlz5s7kmuektcddaw5zq.apigateway.<region>.oci.customer-oci.com/todolist';
19-
const API_LIST = 'https://di2eyonlz5s7kmuektcddaw5zq.apigateway.eu-frankfurt-1.oci.customer-oci.com/todolist';
20-
18+
// const API_LIST = 'https://di2eyonlz5s7kmuektcddaw5zq.apigateway.eu-frankfurt-1.oci.customer-oci.com/todolist';
19+
const API_LIST = '/todolist';
2120
export default API_LIST;

MtdrSpring/backend/src/main/java/com/springboot/MyTodoList/security/WebSecurityConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
1313
@Override
1414
protected void configure(HttpSecurity httpSecurity) throws Exception {
15+
httpSecurity.csrf().disable();
1516
httpSecurity.authorizeRequests().anyRequest().authenticated().and().
1617
formLogin().and().logout().permitAll();
1718
}

0 commit comments

Comments
 (0)