8000 Fix/cookie by zhangshanwen · Pull Request #279 · qor5/admin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix/cookie #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/pquerna/otp v1.4.0
github.com/qor/oss v0.0.0-20230717083721-c04686f83630
github.com/qor5/web/v3 v3.0.5-0.20240613075003-b4a333886932
github.com/qor5/x/v3 v3.0.6-0.20240613091655-4e32c2a3a0c0
github.com/qor5/x/v3 v3.0.6-0.20240624094704-3828883dcc31
github.com/samber/lo v1.39.0
github.com/shurcooL/sanitized_anchor_name v1.0.0
github.com/stretchr/testify v1.9.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ github.com/qor5/x/v3 v3.0.6-0.20240612023138-7884f5d35b53 h1:+frEGK/r/B8ID35ni1T
github.com/qor5/x/v3 v3.0.6-0.20240612023138-7884f5d35b53/go.mod h1:85rLAySzyq7L0dWXzICMnBVULCv53AtYmx3x1qeCDx0=
github.com/qor5/x/v3 v3.0.6-0.20240613091655-4e32c2a3a0c0 h1:iM6KnKiSPbZPRRNwzaMghmdpm0GIcTTJ1qsMtw4nd5c=
github.com/qor5/x/v3 v3.0.6-0.20240613091655-4e32c2a3a0c0/go.mod h1:85rLAySzyq7L0dWXzICMnBVULCv53AtYmx3x1qeCDx0=
github.com/qor5/x/v3 v3.0.6-0.20240624094704-3828883dcc31 h1:1J02VLx+O8QsZ5RnmsQr1JfxnTwyLs2BEIYoKIlVQPA=
github.com/qor5/x/v3 v3.0.6-0.20240624094704-3828883dcc31/go.mod h1:85rLAySzyq7L0dWXzICMnBVULCv53AtYmx3x1qeCDx0=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
Expand Down
6 changes: 5 additions & 1 deletion login/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package login
import (
"fmt"

"github.com/theplant/osenv"

"github.com/qor5/admin/v3/presets"
"github.com/qor5/web/v3"
"github.com/qor5/x/v3/i18n"
Expand All @@ -13,8 +15,10 @@ const (
OpenChangePasswordDialogEvent = "login_openChangePasswordDialog"
)

var cookieSecure = osenv.GetBool("CookieSecure", "set to false for localhost", true)

func New(pb *presets.Builder) *login.Builder {
r := login.New()
r := login.New().CookieSecure(cookieSecure)
r.I18n(pb.I18n())

vh := r.ViewHelper()
Expand Down
Loading
0