* Update files in /app * Update files in /plugin * Update files in /store * Update files in /utils * Update files in /web * Update store.go * Update command_response.go * check-mocks and check-store-layer checks * Fix build errors * Revert "Fix build errors" This reverts commit 4ee38c3d0bf7bd7d8386f46f0985a0d03245a1d4. * Update .golangci.yml * make i18n-extract and make i18n-check * Commit suggestions * check-mocks and check-store-layers * Update en.json * Update product_notices.go * Update main.go * Fix translations * Regenerate mocks Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5f190b5624
Коммит
6356e906e0
@@ -94,7 +94,7 @@ func StringSliceDiff(a, b []string) []string {
|
||||
return result
|
||||
}
|
||||
|
||||
func GetIpAddress(r *http.Request, trustedProxyIPHeader []string) string {
|
||||
func GetIPAddress(r *http.Request, trustedProxyIPHeader []string) string {
|
||||
address := ""
|
||||
|
||||
for _, proxyHeader := range trustedProxyIPHeader {
|
||||
@@ -135,7 +135,7 @@ type RequestCache struct {
|
||||
|
||||
// Fetch JSON data from the notices server
|
||||
// if skip is passed, does a fetch without touching the cache
|
||||
func GetUrlWithCache(url string, cache *RequestCache, skip bool) ([]byte, error) {
|
||||
func GetURLWithCache(url string, cache *RequestCache, skip bool) ([]byte, error) {
|
||||
// Build a GET Request, including optional If-None-Match header.
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
@@ -198,8 +198,8 @@ func IsValidWebAuthRedirectURL(config *model.Config, redirectURL string) bool {
|
||||
u, err := url.Parse(redirectURL)
|
||||
if err == nil && (u.Scheme == "http" || u.Scheme == "https") {
|
||||
if config.ServiceSettings.SiteURL != nil {
|
||||
siteUrl := *config.ServiceSettings.SiteURL
|
||||
return strings.Index(strings.ToLower(redirectURL), strings.ToLower(siteUrl)) == 0
|
||||
siteURL := *config.ServiceSettings.SiteURL
|
||||
return strings.Index(strings.ToLower(redirectURL), strings.ToLower(siteURL)) == 0
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user