mirror of
https://github.com/adityachandelgit/BookLore.git
synced 2026-02-18 03:07:40 +01:00
- Enable CORS for all localhost ports
- Enable pipeline
This commit is contained in:
3
.github/workflows/docker-build-publish.yml
vendored
3
.github/workflows/docker-build-publish.yml
vendored
@@ -3,7 +3,8 @@ name: Build, Tag, and Push to GitHub Container Registry
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- disable
|
||||
- master
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
|
||||
@@ -55,12 +55,11 @@ public class SecurityConfig {
|
||||
@Bean
|
||||
public CorsConfigurationSource corsConfigurationSource() {
|
||||
CorsConfiguration configuration = new CorsConfiguration();
|
||||
configuration.setAllowedOrigins(List.of("http://localhost:4200", "http://localhost:5050"));
|
||||
configuration.setAllowedOrigins(List.of("http://localhost:*"));
|
||||
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS"));
|
||||
configuration.setAllowedHeaders(List.of("Authorization", "Cache-Control", "Content-Type"));
|
||||
configuration.setExposedHeaders(List.of("Content-Disposition"));
|
||||
configuration.setAllowCredentials(true);
|
||||
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
source.registerCorsConfiguration("/**", configuration);
|
||||
return source;
|
||||
|
||||
Reference in New Issue
Block a user