Skip to content

Commit

Permalink
don't persist session data in api application (fixes #3972)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimura Youichi authored and nishizoe committed Nov 9, 2016
1 parent 652d5c3 commit 9e8cbbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions apps/api/config/factories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@ all:
# logging: %SF_LOGGING_ENABLED%
# use_flash: true
# default_culture: %SF_DEFAULT_CULTURE%
#
# storage:
# class: sfSessionStorage
# param:
# session_name: symfony
#

storage:
class: sfNoStorage

# view_cache:
# class: sfFileCache
# param:
Expand Down
2 changes: 1 addition & 1 deletion lib/config/opProjectConfiguration.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected function setOpenPNEConfiguration()
opToolkit::writeCacheFile($opConfigCachePath, '<?php return '.var_export($config, true).';');
}

if ('test' !== sfConfig::get('sf_environment'))
if ('test' !== sfConfig::get('sf_environment') && 'api' !== sfConfig::get('sf_app'))
{
$this->configureSessionStorage($config['session_storage']['name'], (array)$config['session_storage']['options']);
}
Expand Down

0 comments on commit 9e8cbbf

Please sign in to comment.