Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
6decf897
Commit
6decf897
authored
8 years ago
by
Giovannoni Laurent
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #4618 enable jlnp with client cookies
parent
54fdc0ed
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
maarch_entreprise/trunk/index.php
+49
-1
49 additions, 1 deletion
maarch_entreprise/trunk/index.php
maarch_entreprise/trunk/setProxyCookies.php
+30
-0
30 additions, 0 deletions
maarch_entreprise/trunk/setProxyCookies.php
with
79 additions
and
1 deletion
maarch_entreprise/trunk/index.php
+
49
−
1
View file @
6decf897
...
...
@@ -217,7 +217,55 @@ $time = $core->get_session_time_expire();
echo
$_SESSION
[
'config'
][
'businessappurl'
];
?>
index.php?display=true&page=logout&logout=true');"
id=
"maarch_body"
>
<?php
<?php
//do it only once
if
(
empty
(
$_SESSION
[
'clientSideCookies'
]))
{
?>
<script
type=
"text/javascript"
>
function
getCookies
()
{
//document.cookie = "maarch_cookie_1=thefirstcookie";
//document.cookie = "maarch_cookie_2=thesecondcookie";
//console.log(document.cookie);
return
document
.
cookie
;
};
var
theCookies
;
//theCookies = getCookies().split(";");
theCookies
=
getCookies
();
if
(
theCookies
!=
undefined
)
{
//console.log('The cookies...');
//console.log(theCookies);
var
path_manage_script
=
'
<?php
echo
$_SESSION
[
"config"
][
"businessappurl"
];
?>
'
+
'
index.php?display=true&page=setProxyCookies
'
;
new
Ajax
.
Request
(
path_manage_script
,
{
method
:
'
post
'
,
parameters
:
{
cookies
:
theCookies
},
onSuccess
:
function
(
answer
)
{
eval
(
'
response =
'
+
answer
.
responseText
);
//console.log(response);
if
(
response
.
status
==
'
0
'
)
{
//console.log('OK !!! COOKIES FROM PROXY SET');
}
else
{
//console.log('KO... COOKIES FROM PROXY NOT SET');
}
}
});
}
else
{
//console.log('no completements cookies');
}
</script>
<?php
}
if
(
!
isset
(
$_REQUEST
[
'display'
]))
{
?>
<script>
var
element
=
document
;
...
...
This diff is collapsed.
Click to expand it.
maarch_entreprise/trunk/setProxyCookies.php
0 → 100755
+
30
−
0
View file @
6decf897
<?php
/*
* Copyright 2008-2016 Maarch
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
if
(
!
empty
(
$_REQUEST
[
'cookies'
]))
{
$_SESSION
[
'clientSideCookies'
]
=
$_REQUEST
[
'cookies'
];
echo
"{status : '0'}"
;
}
else
{
$_SESSION
[
'clientSideCookies'
]
=
false
;
echo
"{status : '1'}"
;
}
exit
;
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