<commit_before>package location

import (
	"net/url"
	"strings"

	"github.com/drone/gin-location"
	"github.com/gin-gonic/gin"
	"github.com/solderapp/solder-api/config"
)

// Location gets the location from the context.
func Location(c *gin.Context) *url.URL {
	return location.Get(c)
}

// SetLocation injects the location into the context.
func SetLocation() gin.HandlerFunc {
	return location.New(location.Config{
		Host: "localhost:8080",
		Base: strings.TrimSuffix(
			config.Server.Root,
			"/",
		),
	})
}<commit_msg>Set a default scheme for location middleware<commit_after>package location

import (
	"net/url"
	"strings"

	"github.com/drone/gin-location"
	"github.com/gin-gonic/gin"
	"github.com/solderapp/solder-api/config"
)

// Location gets the location from the context.
func Location(c *gin.Context) *url.URL {
	return location.Get(c)
}

// SetLocation injects the location into the context.
func SetLocation() gin.HandlerFunc {
	return location.New(location.Config{
		Scheme: "http",
		Host:   "localhost:8080",
		Base: strings.TrimSuffix(
			config.Server.Root,
			"/",
		),
	})
}
{'fraction_non_alphanumeric': 0.13855970829535097, 'fraction_numerical': 0.007292616226071103, 'mean_word_length': 4.059907834101383, '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': '3615302', 'n_tokens_mistral': 413, 'n_tokens_neox': 382, 'n_words': 84}