fix: several nits

This commit is contained in:
Paul Pan 2023-12-21 17:08:53 +08:00
parent d8df6d577e
commit 9485dbbce4
Signed by: Paul
GPG Key ID: D639BDF5BA578AF4
4 changed files with 9 additions and 3 deletions

View File

@ -2,7 +2,7 @@
/woj
# runner
resource/runner/.mark.container
resource/runner/.mark.image
resource/runner/problem/*
resource/runner/tmp/*
resource/runner/user/*

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SwaggerSettings">
<option name="defaultPreviewType" value="SWAGGER_UI" />
</component>
</project>

View File

@ -10,7 +10,7 @@ import (
)
func (s *service) EnsureDeps(force bool) e.Status {
mark := filepath.Join(Prefix, ".mark.container")
mark := filepath.Join(Prefix, ".mark.image")
if force {
_ = os.Remove(mark)

View File

@ -79,7 +79,7 @@ func (s *service) initRouters(conf *model.Config, injector *do.Injector) *gin.En
r.Use(cors.New(cors.Config{
AllowAllOrigins: true,
AllowMethods: []string{"GET", "POST", "PUT", "OPTIONS"},
AllowHeaders: []string{"Origin", "Content-Length", "Content-Type"},
AllowHeaders: []string{"Authorization", "Origin", "Content-Length", "Content-Type"},
AllowCredentials: true,
}))