Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
341
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
25
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TransFem.org
Sharkey
Commits
13e80bb5
Unverified
Commit
13e80bb5
authored
6 years ago
by
syuilo
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1290 from akihikodaki/cookie
Specify Cookie domain with hostname
parents
a23790a1
0109e081
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/api/common/signin.ts
+1
-1
1 addition, 1 deletion
src/api/common/signin.ts
src/web/app/common/mios.ts
+2
-2
2 additions, 2 deletions
src/web/app/common/mios.ts
src/web/app/config.ts
+2
-0
2 additions, 0 deletions
src/web/app/config.ts
webpack.config.ts
+1
-0
1 addition, 0 deletions
webpack.config.ts
with
6 additions
and
3 deletions
src/api/common/signin.ts
+
1
−
1
View file @
13e80bb5
...
...
@@ -4,7 +4,7 @@ export default function(res, user, redirect: boolean) {
const
expires
=
1000
*
60
*
60
*
24
*
365
;
// One Year
res
.
cookie
(
'
i
'
,
user
.
token
,
{
path
:
'
/
'
,
domain
:
`.
${
config
.
host
}
`
,
domain
:
`.
${
config
.
host
name
}
`
,
secure
:
config
.
url
.
substr
(
0
,
5
)
===
'
https
'
,
httpOnly
:
false
,
expires
:
new
Date
(
Date
.
now
()
+
expires
),
...
...
This diff is collapsed.
Click to expand it.
src/web/app/common/mios.ts
+
2
−
2
View file @
13e80bb5
...
...
@@ -3,7 +3,7 @@ import { EventEmitter } from 'eventemitter3';
import
*
as
merge
from
'
object-assign-deep
'
;
import
*
as
uuid
from
'
uuid
'
;
import
{
host
,
apiUrl
,
swPublickey
,
version
,
lang
,
googleMapsApiKey
}
from
'
../config
'
;
import
{
host
name
,
apiUrl
,
swPublickey
,
version
,
lang
,
googleMapsApiKey
}
from
'
../config
'
;
import
Progress
from
'
./scripts/loading
'
;
import
Connection
from
'
./scripts/streaming/stream
'
;
import
{
HomeStreamManager
}
from
'
./scripts/streaming/home
'
;
...
...
@@ -220,7 +220,7 @@ export default class MiOS extends EventEmitter {
public
signout
()
{
localStorage
.
removeItem
(
'
me
'
);
document
.
cookie
=
`i=; domain=.
${
host
}
; expires=Thu, 01 Jan 1970 00:00:01 GMT;`
;
document
.
cookie
=
`i=; domain=.
${
host
name
}
; expires=Thu, 01 Jan 1970 00:00:01 GMT;`
;
location
.
href
=
'
/
'
;
}
...
...
This diff is collapsed.
Click to expand it.
src/web/app/config.ts
+
2
−
0
View file @
13e80bb5
declare
const
_HOST_
:
string
;
declare
const
_HOSTNAME_
:
string
;
declare
const
_URL_
:
string
;
declare
const
_API_URL_
:
string
;
declare
const
_DOCS_URL_
:
string
;
...
...
@@ -16,6 +17,7 @@ declare const _LICENSE_: string;
declare
const
_GOOGLE_MAPS_API_KEY_
:
string
;
export
const
host
=
_HOST_
;
export
const
hostname
=
_HOSTNAME_
;
export
const
url
=
_URL_
;
export
const
apiUrl
=
_API_URL_
;
export
const
docsUrl
=
_DOCS_URL_
;
...
...
This diff is collapsed.
Click to expand it.
webpack.config.ts
+
1
−
0
View file @
13e80bb5
...
...
@@ -84,6 +84,7 @@ module.exports = entries.map(x => {
_CH_URL_
:
config
.
ch_url
,
_LANG_
:
lang
,
_HOST_
:
config
.
host
,
_HOSTNAME_
:
config
.
hostname
,
_URL_
:
config
.
url
,
_LICENSE_
:
licenseHtml
,
_GOOGLE_MAPS_API_KEY_
:
config
.
google_maps_api_key
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment