mirror of
https://github.com/dani/vroom.git
synced 2024-06-23 01:59:13 +02:00
Add a new etherpadBaseDomain param so you can set the domain for etherpad Cookie
This commit is contained in:
parent
c1418e3aee
commit
109f4380da
|
@ -41,8 +41,11 @@ chromeExtensionId => 'ecicdpoejfllflombfanbhfpgcimjddn',
|
|||
|
||||
# For etherpad integration, set the etherpad base url
|
||||
# and API Key
|
||||
etherpadUri => '',
|
||||
etherpadApiKey => '',
|
||||
#etherpadUri => '',
|
||||
#etherpadApiKey => '',
|
||||
# You can also set the base domain common to both vroom and etherpad
|
||||
# For example, if you use vroom.example.com and pad.example.com, the base domain is example.com
|
||||
#etherpadBaseDomaine => '',
|
||||
|
||||
# Various
|
||||
sendmail => '/sbin/sendmail'
|
||||
|
|
|
@ -126,6 +126,7 @@ our $config = plugin Config => {
|
|||
chromeExtensionId => 'ecicdpoejfllflombfanbhfpgcimjddn',
|
||||
etherpadUri => '',
|
||||
etherpadApiKey => '',
|
||||
etherpadBaseDomain => '',
|
||||
sendmail => '/sbin/sendmail'
|
||||
}
|
||||
};
|
||||
|
@ -862,7 +863,11 @@ get '/(*room)' => sub {
|
|||
$self->session($room)->{etherpadAuthorId} = $id;
|
||||
my $etherpadSession = $ec->create_session($data->{etherpad_group}, $id, time + 86400);
|
||||
$self->session($room)->{etherpadSessionId} = $etherpadSession;
|
||||
$self->cookie(sessionID => $etherpadSession);
|
||||
my $etherpadCookieParam = {};
|
||||
if ($config->{etherpadBaseDomain} && $config->{etherpadBaseDomain} ne ''){
|
||||
$etherpadCookieParam->{domain} = $config->{etherpadBaseDomain};
|
||||
}
|
||||
$self->cookie(sessionID => $etherpadSession, $etherpadCookieParam);
|
||||
}
|
||||
# Short life cookie to negociate a session with the signaling server
|
||||
$self->cookie(vroomsession => encode_base64($self->session('name') . ':' . $data->{name} . ':' . $data->{token}, ''), {expires => time + 60, path => '/'});
|
||||
|
|
Loading…
Reference in New Issue
Block a user