mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-05-30 11:06:11 +08:00
ci(docker-publish): 确保仅在push事件时提交标签更新 (#22)
* ci(docker-publish): 确保仅在push事件时提交标签更新 * refactor(github-workflows): 标准化Gitea Sync workflow名称 * feat(cors): 全局启用CORS支持 在Spring应用中通过配置CORS实现跨域请求支持,允许所有来源、方法和头。 此变更有助于解决前端应用在不同域上运行时的跨域问题。
This commit is contained in:
parent
2c51b04381
commit
b7afe430d3
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" ]
|
||||
|
23
src/main/java/top/suyiiyii/sims/common/CorsConfig.java
Normal file
23
src/main/java/top/suyiiyii/sims/common/CorsConfig.java
Normal file
@ -0,0 +1,23 @@
|
||||
package top.suyiiyii.sims.common;
|
||||
|
||||
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 {
|
||||
|
||||
@Bean
|
||||
public WebMvcConfigurer corsConfigurer() {
|
||||
return new WebMvcConfigurer() {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("*")
|
||||
.allowedMethods("*")
|
||||
.allowedHeaders("*");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user