Skip to content
Snippets Groups Projects
Commit 6fe86e25 authored by Anders Montsko Austlid's avatar Anders Montsko Austlid
Browse files

Merge branch 'bugfix/cors-policy' into 'main'

Bugfix/cors policy

See merge request idatt2106-v23-03/backend!54
parents a225810c 732d7a0c
No related branches found
No related tags found
No related merge requests found
......@@ -31,10 +31,14 @@ public class CorsConfig {
@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
/**
* TODO: Change allowedOrigins setup (Can be done in application.properties?)
*/
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins(domainProperty.domain())
.allowedOrigins("http://localhost:5173")
.allowedMethods(Arrays.asList(
HttpMethod.GET.name(),
HttpMethod.POST.name(),
......
......@@ -9,7 +9,7 @@ import ntnu.idatt2016.v233.SmartMat.entity.Groups;
*
* @author Stian Lyng
* @version 1.0
* @since 04.04.2023
* @since 19.04.2023
*/
public interface GroupRepository extends JpaRepository<Groups, Long> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment