php - Symfony - Making dev environment inaccessible in prod -


I have recently deployed a Symphony project and have seen that Dev Environment is still accessible.

The following URL loads the prod version of the project:

http://domain.com/app.php/index < P> The following URL version loads the project:

http://domain.com/app_dev.php/index

I was thinking that Is it possible to make the Dev version impossible in the project environment?

I appreciate any advice, thanks in advance!

Add the following lines of code to your app_dev.php

  // This checkdog prevents access to front controllers which are positioned on the production server by accident. // Free to remove it, extend it, or refine something more. If (! In_array (@ $ _ SERVER ['REMOTE_ADDR'], array ('127.0.0.1', ':: 1',))) {header ('http / 1.0 403 prohibited'); Exit ('You do not have permission to access this file.' Check '.basename (__File__).' For more information. '); }    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -