mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +00:00
Rename helper packages
This commit is contained in:
parent
3c3f397bf5
commit
c39f2e1a8d
31 changed files with 97 additions and 97 deletions
|
@ -7,7 +7,7 @@ package core
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/miniflux/miniflux/helper"
|
||||
"github.com/miniflux/miniflux/crypto"
|
||||
"github.com/miniflux/miniflux/locale"
|
||||
"github.com/miniflux/miniflux/logger"
|
||||
"github.com/miniflux/miniflux/model"
|
||||
|
@ -111,7 +111,7 @@ func (c *Context) OAuth2State() string {
|
|||
|
||||
// GenerateOAuth2State generate a new OAuth2 state.
|
||||
func (c *Context) GenerateOAuth2State() string {
|
||||
state := helper.GenerateRandomString(32)
|
||||
state := crypto.GenerateRandomString(32)
|
||||
c.store.UpdateSessionField(c.SessionID(), "oauth2_state", state)
|
||||
return state
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/miniflux/miniflux/config"
|
||||
"github.com/miniflux/miniflux/helper"
|
||||
"github.com/miniflux/miniflux/locale"
|
||||
"github.com/miniflux/miniflux/logger"
|
||||
"github.com/miniflux/miniflux/server/middleware"
|
||||
"github.com/miniflux/miniflux/server/template"
|
||||
"github.com/miniflux/miniflux/storage"
|
||||
"github.com/miniflux/miniflux/timer"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/tomasen/realip"
|
||||
|
@ -36,7 +36,7 @@ type Handler struct {
|
|||
// Use is a wrapper around an HTTP handler.
|
||||
func (h *Handler) Use(f HandlerFunc) http.Handler {
|
||||
return h.middleware.WrapFunc(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
defer helper.ExecutionTime(time.Now(), r.URL.Path)
|
||||
defer timer.ExecutionTime(time.Now(), r.URL.Path)
|
||||
logger.Debug("[HTTP] %s %s %s", realip.RealIP(r), r.Method, r.URL.Path)
|
||||
|
||||
if r.Header.Get("X-Forwarded-Proto") == "https" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue