Skip to content

Commit 13cfd07

Browse files
committed
#525 Rename cookies to prevent collision with other applications (Cortex)
1 parent ec981e3 commit 13cfd07

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

thehive-backend/conf/reference.conf

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# HTTP filters
66
play.filters {
77
# name of cookie in which the CSRF token is transmitted to client
8-
csrf.cookie.name = XSRF-TOKEN
8+
csrf.cookie.name = THE-HIVE-XSRF-TOKEN
99
# name of header in which the client should send CSRD token
10-
csrf.header.name = X-XSRF-TOKEN
10+
csrf.header.name = X-THe-HIVE-XSRF-TOKEN
1111

1212
enabled = [
1313
services.StreamFilter,
@@ -22,7 +22,7 @@ play.http.errorHandler = org.elastic4play.ErrorHandler
2222
# Register module for dependency injection
2323
play.modules.enabled += global.TheHive
2424

25-
25+
play.http.session.cookieName = THE_HIVE_SESSION
2626

2727
# ElasticSearch
2828
search {

ui/app/scripts/app.js

+2
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ angular.module('thehive', ['ngAnimate', 'ngMessages', 'ngSanitize', 'ui.bootstra
332332
.config(function($httpProvider) {
333333
'use strict';
334334

335+
$httpProvider.defaults.xsrfCookieName = 'THE-HIVE-XSRF-TOKEN';
336+
$httpProvider.defaults.xsrfHeaderName = 'X-THE-HIVE-XSRF-TOKEN';
335337
$httpProvider.interceptors.push(function($rootScope, $q) {
336338
var isApiCall = function(url) {
337339
return url && url.startsWith('./api') && !url.startsWith('./api/stream');

0 commit comments

Comments
 (0)