Commit 070304c0 by Rubén Ramírez

feat: [WebConfig]: Añadidos comentarios a la clase WebConfig

parent 172eefa3
...@@ -2,12 +2,15 @@ package com.ujaen.tfg.mangaffinity.config; ...@@ -2,12 +2,15 @@ package com.ujaen.tfg.mangaffinity.config;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration @Configuration
public class WebConfig implements WebMvcConfigurer { public class WebConfig implements WebMvcConfigurer {
/**
* Función que define la configuración de CORS para permitir solicitudes desde el frontend
* alojado en http://localhost:8080.
*/
@Override @Override
public void addCorsMappings(CorsRegistry registry) { public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedOrigins("http://localhost:8080"); registry.addMapping("/**").allowedOrigins("http://localhost:8080");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment