<commit_before>package http

import (
	"github.com/Cepave/fe/g"
	"github.com/Cepave/fe/http/dashboard"
	"github.com/Cepave/fe/http/home"
	"github.com/Cepave/fe/http/uic"
	uic_model "github.com/Cepave/fe/model/uic"
	"github.com/astaxie/beego"
)

func Start() {
	if !g.Config().Http.Enabled {
		return
	}

	addr := g.Config().Http.Listen
	if addr == "" {
		return
	}

	home.ConfigRoutes()
	uic.ConfigRoutes()
	dashboard.ConfigRoutes()

	beego.AddFuncMap("member", uic_model.MembersByTeamId)
	beego.Run(addr)
}<commit_msg>enable AllowAllOrigins<commit_after>package http

import (
	"github.com/Cepave/fe/g"
	"github.com/Cepave/fe/http/dashboard"
	"github.com/Cepave/fe/http/home"
	"github.com/Cepave/fe/http/uic"
	uic_model "github.com/Cepave/fe/model/uic"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/plugins/cors"
)

func Start() {
	if !g.Config().Http.Enabled {
		return
	}

	addr := g.Config().Http.Listen
	if addr == "" {
		return
	}

	home.ConfigRoutes()
	uic.ConfigRoutes()
	dashboard.ConfigRoutes()

	beego.AddFuncMap("member", uic_model.MembersByTeamId)
	beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
		AllowAllOrigins: true,
	}))
	beego.Run(addr)
}
{'fraction_non_alphanumeric': 0.16904962153069805, 'fraction_numerical': 0.0, 'mean_word_length': 4.336322869955157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '169697', 'n_tokens_mistral': 523, 'n_tokens_neox': 514, 'n_words': 59}