no message
parent
bc4bdc7414
commit
dfd23b94ea
|
@ -3,11 +3,6 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="7cf7b6b3-0082-44ef-bb0f-bfcc57e19eb1" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/controller/file.go" beforeDir="false" afterPath="$PROJECT_DIR$/controller/file.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/controller/hardware.go" beforeDir="false" afterPath="$PROJECT_DIR$/controller/hardware.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/db/elasticEngine.go" beforeDir="false" afterPath="$PROJECT_DIR$/db/elasticEngine.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/main.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/model/hardware.go" beforeDir="false" afterPath="$PROJECT_DIR$/model/hardware.go" afterDir="false" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
|
@ -36,7 +31,7 @@
|
|||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="GOROOT" path="D:/programs/GOROOT" />
|
||||
<component name="GOROOT" path="C:\Go" />
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
|
@ -50,8 +45,9 @@
|
|||
<property name="configurable.Project.GOPATH.is.expanded" value="true" />
|
||||
<property name="go.import.settings.migrated" value="true" />
|
||||
<property name="go.sdk.automatically.set" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/.." />
|
||||
<property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="restartRequiresConfirmation" value="false" />
|
||||
<property name="settings.editor.selected.configurable" value="vcs.Git" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
// 使用 IntelliSense 了解相关属性。
|
||||
// 悬停以查看现有属性的描述。
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceRoot}/main.go",
|
||||
"env": {},
|
||||
"args": [],
|
||||
"cwd":".",
|
||||
}
|
||||
]
|
||||
}
|
6
main.go
6
main.go
|
@ -7,10 +7,11 @@ import (
|
|||
"background/db"
|
||||
"background/logs"
|
||||
"background/model"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/tommy351/gin-sessions"
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
sessions "github.com/tommy351/gin-sessions"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -20,7 +21,6 @@ var (
|
|||
webhookController = controller.WebHookController{}
|
||||
)
|
||||
|
||||
|
||||
func CORSMiddleware(c *gin.Context) {
|
||||
c.Writer.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
|
||||
if config.ApiConfig().RunMode == "release" {
|
||||
|
|
Loading…
Reference in New Issue