File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,12 @@ func CookieName(i *instance.Instance) string {
180180// subdomains, we need to put it one level higher (eg .mycozy.cloud instead of
181181// .example.mycozy.cloud) to make the cookie available when the user visits
182182// their apps.
183+ // In development mode, returns empty string to make cookies host-only,
184+ // which allows tests to work with localhost.
183185func CookieDomain (i * instance.Instance ) string {
186+ if build .IsDevRelease () {
187+ return ""
188+ }
184189 domain := i .ContextualDomain ()
185190 if config .GetConfig ().Subdomains == config .FlatSubdomains {
186191 parts := strings .SplitN (domain , "." , 2 )
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ func TestShortcuts(t *testing.T) {
7171
7272 cozyMeta := attrs .Value ("cozyMetadata" ).Object ()
7373 cozyMeta .Value ("createdAt" ).String ().DateTime (time .RFC3339 )
74- cozyMeta .Value ("createdOn" ).String ().Contains ("https://testshortcuts_ " )
74+ cozyMeta .Value ("createdOn" ).String ().Contains ("https://testshortcuts- " )
7575
7676 target := attrs .Value ("metadata" ).Object ().Value ("target" ).Object ()
7777 target .ValueEqual ("app" , "photos" )
You can’t perform that action at this time.
0 commit comments