mirror of
				https://github.com/suyiiyii/SIMS.git
				synced 2025-11-04 15:54:52 +08:00 
			
		
		
		
	Merge remote-tracking branch 'origin/main' into wr
This commit is contained in:
		
						commit
						df55f364b0
					
				
							
								
								
									
										1
									
								
								.github/workflows/docker-publish.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/docker-publish.yml
									
									
									
									
										vendored
									
									
								
							@ -113,6 +113,7 @@ jobs:
 | 
			
		||||
        with:
 | 
			
		||||
          cmd: yq eval '.image.tag = "${{ steps.meta.outputs.version }}"' -i values.yaml
 | 
			
		||||
      - name: Git Auto Commit
 | 
			
		||||
        if: github.event_name == 'push'
 | 
			
		||||
        uses: stefanzweifel/git-auto-commit-action@v5.0.1
 | 
			
		||||
        with:
 | 
			
		||||
          commit_message: "Update deployment image to ${{ steps.meta.outputs.version }}"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/gitea-sync.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/gitea-sync.yml
									
									
									
									
										vendored
									
									
								
							@ -1,4 +1,4 @@
 | 
			
		||||
name: gitea-sync.yml
 | 
			
		||||
name: Gitea Sync
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches: [ "main", "manifest" ]
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,26 @@
 | 
			
		||||
package top.suyiiyii.sims.common;
 | 
			
		||||
 | 
			
		||||
import org.springframework.context.annotation.Bean;
 | 
			
		||||
import org.springframework.context.annotation.Configuration;
 | 
			
		||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
 | 
			
		||||
import org.springframework.web.filter.CorsFilter;
 | 
			
		||||
 | 
			
		||||
@Configuration
 | 
			
		||||
public class CorsConfiguration {
 | 
			
		||||
 | 
			
		||||
    @Bean
 | 
			
		||||
    public CorsFilter corsFilter() {
 | 
			
		||||
        org.springframework.web.cors.CorsConfiguration config = new org.springframework.web.cors.CorsConfiguration();
 | 
			
		||||
        config.addAllowedOrigin("*");
 | 
			
		||||
        config.addAllowedMethod("OPTIONS");
 | 
			
		||||
        config.addAllowedMethod("POST");
 | 
			
		||||
        config.addAllowedHeader("*");
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        UrlBasedCorsConfigurationSource configSource = new UrlBasedCorsConfigurationSource();
 | 
			
		||||
        configSource.registerCorsConfiguration("/**", config);
 | 
			
		||||
 | 
			
		||||
        return new CorsFilter(configSource);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user