Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
845
Issues
845
List
Boards
Labels
Service Desk
Milestones
Merge Requests
46
Merge Requests
46
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
bac61fd0
Commit
bac61fd0
authored
2 hours ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): Pass Pro Domain headers on every request
parent
fa8d62d3
epic/minds-pro
1 merge request
!528
WIP: (feat): Minds Pro
Pipeline
#81913159
failed with stages
in 5 minutes and 19 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
client.ts
src/app/services/api/client.ts
+6
-3
upload.ts
src/app/services/api/upload.ts
+5
-1
index.php
src/index.php
+0
-2
No files found.
src/app/services/api/client.ts
View file @
bac61fd0
...
...
@@ -202,17 +202,20 @@ export class Client {
private
buildOptions
(
options
:
Object
)
{
const
XSRF_TOKEN
=
this
.
cookie
.
get
(
'
XSRF-TOKEN
'
)
||
''
;
const
headers
=
new
HttpHeaders
(
{
const
headers
=
{
'
X-XSRF-TOKEN
'
:
XSRF_TOKEN
,
'
X-VERSION
'
:
environment
.
version
,
}
)
;
};
if
(
this
.
origin
)
{
const
PRO_XSRF_JWT
=
this
.
cookie
.
get
(
'
PRO-XSRF-JWT
'
)
||
''
;
headers
[
'
X-MINDS-ORIGIN
'
]
=
this
.
origin
;
headers
[
'
X-PRO-XSRF-JWT
'
]
=
PRO_XSRF_JWT
;
}
const
builtOptions
=
{
headers
:
headers
,
headers
:
new
HttpHeaders
(
headers
)
,
cache
:
true
,
};
...
...
This diff is collapsed.
Click to expand it.
src/app/services/api/upload.ts
View file @
bac61fd0
...
...
@@ -79,8 +79,12 @@ export class Upload {
xhr
.
setRequestHeader
(
'
X-XSRF-TOKEN
'
,
XSRF_TOKEN
);
if
(
this
.
origin
)
{
xhr
.
setRequestHeader
(
'
X-MINDS-ORIGIN
'
,
this
.
origin
);
const
PRO_XSRF_JWT
=
this
.
cookie
.
get
(
'
PRO-XSRF-JWT
'
)
||
''
;
xhr
.
withCredentials
=
true
;
xhr
.
setRequestHeader
(
'
X-MINDS-ORIGIN
'
,
this
.
origin
);
xhr
.
setRequestHeader
(
'
X-PRO-XSRF-JWT
'
,
PRO_XSRF_JWT
);
}
xhr
.
send
(
formData
);
...
...
This diff is collapsed.
Click to expand it.
src/index.php
View file @
bac61fd0
<?php
$meta
=
Minds\Core\SEO\Manager
::
get
();
$pro
=
Minds\Core\Di\Di
::
_
()
->
get
(
'Pro\Domain'
)
->
lookup
(
$_SERVER
[
'HTTP_HOST'
]
??
null
);
?>
<?php
if
(
!
defined
(
'__MINDS_CONTEXT__'
))
{
define
(
'__MINDS_CONTEXT__'
,
'app'
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment