Merge remote-tracking branch 'origin/main' into wr

This commit is contained in:
tortoise 2024-08-29 21:57:45 +08:00
commit df55f364b0
3 changed files with 28 additions and 1 deletions

View File

@ -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 }}"

View File

@ -1,4 +1,4 @@
name: gitea-sync.yml
name: Gitea Sync
on:
push:
branches: [ "main", "manifest" ]

View File

@ -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);
}
}