Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 637001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:34:34+00:00 2026-05-13T20:34:34+00:00

i made a apps/frontend/config/security.yml dev: default: is_secure: false prod: default: is_secure: true but it

  • 0

i made a

apps/frontend/config/security.yml

dev:
 default:
  is_secure: false

prod:
 default:
  is_secure: true

but it is not working, am i missing something ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:34:35+00:00Added an answer on May 13, 2026 at 8:34 pm

    As steve says, is_secure can’t be configured on a per environment basis.

    My guess is that you are trying to password protect your entire dev environment? I’d suggest that you use .htaccess/.htpasswd protection or equivalent to protect a site in this way.

    If you can’t or for whatever reason want to do it in symfony, you could make symfony accept configuration in this way by creating a custom sfSecurityConfigHandler.class.php

    Config handlers have a method in them called getConfiguration – this is in charge of getting the values set in the various yml files and creating an array of the final values after all over-rides etc have been applied.

    sfSecurityConfigHander.class.php has a getConfiguration like this:

    static public function getConfiguration(array $configFiles)
    {
      $config = self::flattenConfiguration(self::parseYamls($configFiles));
    
      // change all of the keys to lowercase
      $config = array_change_key_case($config);
    
      return $config;
    }
    

    whilst a configuration that depends on environment, such as sfDatabaseConfigHandler.class.php has one like this:

    static public function getConfiguration(array $configFiles)
    {
      $config = self::replaceConstants(self::flattenConfigurationWithEnvironment(self::parseYamls($configFiles)));
    
      foreach ($config as $name => $dbConfig)
      {
        if (isset($dbConfig['file']))
        {
          $config[$name]['file'] = self::replacePath($dbConfig['file']);
        }
      }
    
      return $config;
    }
    

    The key difference here is the use of self::flattenConfigurationWithEnvironment over self::flattenConfiguration. I think if you extend sfSecurityConfigHandler with:

    class mySecurityConfigHandler extends sfSecurityConfigHandler {
        static public function getConfiguration(array $configFiles)
        {
          $config = self::flattenConfigurationWithEnvironment(self::parseYamls($configFiles));
    
          // change all of the keys to lowercase
          $config = array_change_key_case($config);
    
          return $config;
        }
    }
    

    and then create a config_handlers.yml file in your config telling symfony to use this class:

    modules/*/config/security.yml:
      class:    sfSecurityConfigHandler
      file:     %sf_lib_dir%/path/to/mySecurityConfigHandler
    

    You should then be able to use the yml as per the question to configure security per environment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 347k
  • Answers 347k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer op said: It may not be fare to ask like… May 14, 2026 at 6:27 am
  • Editorial Team
    Editorial Team added an answer Figured it out. These classes (GenericDAO and DAOFactory as return… May 14, 2026 at 6:27 am
  • Editorial Team
    Editorial Team added an answer As mentioned, Silverlight maintains application state, unlike a traditional ASP.NET… May 14, 2026 at 6:27 am

Related Questions

I have a 3-tier .NET service app, which follows the standard approach: Frontend ->
I am about to start my A-Level Computing project (High School Level) which will
I made a blog database and created some tables in it. I have wriTten
I have made a little app for signing up for an event. User input
I just made a browser using c# as one of my first projects of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.