Added categories to workflows

This commit is contained in:
frikky
2021-02-06 13:09:55 +01:00
parent 11ddf604ec
commit 681be88a3c
7 changed files with 95 additions and 27 deletions
+3 -3
View File
@@ -2877,8 +2877,8 @@ func fixUserOrg(ctx context.Context, user *User) *User {
// Used for testing only. Shouldn't impact production.
func handleCors(resp http.ResponseWriter, request *http.Request) bool {
//allowedOrigins := "http://localhost:3000"
allowedOrigins := "http://localhost:3002"
allowedOrigins := "http://localhost:3000"
//allowedOrigins := "http://localhost:3002"
resp.Header().Set("Vary", "Origin")
resp.Header().Set("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With, remember-me, Authorization")
@@ -4628,7 +4628,7 @@ func findAvailablePorts(startRange int64, endRange int64) string {
func handleSendalert(resp http.ResponseWriter, request *http.Request) {
user, err := handleApiAuthentication(resp, request)
if err != nil {
log.Printf("Api authentication failed in getworkflows: %s", err)
log.Printf("Api authentication failed in sendalert: %s", err)
resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`))
return