Skip to content
Snippets Groups Projects
Commit bc54b3dc authored by migudel's avatar migudel :speech_balloon:
Browse files

Cambio a entorno de desarrollo angular

parent 15f363ca
No related branches found
No related tags found
1 merge request!26Revert "Funciona register"
const monolithUrl = 'http://rooms-booking-api:8080'; // const monolithUrl = 'http://rooms-booking-api:8080';
// export const environment = {
// production: true,
// authAPI: 'http://auth-api:8101',
// userAPI: `http://${monolithUrl}/users`,
// hotelAPI: `http://${monolithUrl}/hotels`,
// bookingAPI: `http://${monolithUrl}/bookings`,
// };
const monolithUrl = 'localhost:8080';
export const environment = { export const environment = {
production: true, production: false,
authAPI: 'http://auth-api:8101', authAPI: 'http://localhost:8101',
userAPI: `http://${monolithUrl}/users`, userAPI: `http://${monolithUrl}/users`,
hotelAPI: `http://${monolithUrl}/hotels`, hotelAPI: `http://${monolithUrl}/hotels`,
bookingAPI: `http://${monolithUrl}/bookings`, bookingAPI: `http://${monolithUrl}/bookings`,
......
package com.uva.authentication.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class CorsConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // Permitir acceso a todos los endpoints
.allowedOrigins("http://localhost:4200") // Origen del frontend
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
.allowedHeaders("*")
.allowCredentials(true);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment