Jump to content

[solved] Request: Add option to define development host


Recommended Posts

Posted

Hey @adrian

I've recently switched to DDEV for my local development. Everything works great so far ? Today I found one issue with tracy and the "force guest users into DEV mode on LOCALHOST"

This feature does not work when using ddev. I'm also not sure about the "DETECT" setting of output mode... Would it be possible to make the output mode configurable from the host name?

myproject.ddev.site --> DEVELOPMENT
myproject.com --> PRODUCTION

It would then be great to have an option "force guest users into DEV mode on DEV environment"

How can I check wich output mode my tracy detects when using "DETECT" setting?

Thx for your help!

Posted

Hi @bernhard - a few questions / comments.

1) Does it work if you select DEVELOPMENT instead of DETECT?

2) DETECT should take care of determining whether you are in a local dev environment vs a remote server.

3) The Output Mode panel will tell you what mode has been detected.

4) Does it help if you put this in your config.php?

$config->tracy = [
    'outputMode' => 'development',
    'guestForceDevelopmentLocal' => true,
    'forceIsLocal' => true,
];

 

  • Thanks 1
Posted
11 minutes ago, adrian said:

1) Does it work if you select DEVELOPMENT instead of DETECT?

Nope, that was my first idea ? 

11 minutes ago, adrian said:

2) DETECT should take care of determining whether you are in a local dev environment vs a remote server.

3) The Output Mode panel will tell you what mode has been detected.

Yeah, it should, but it detects PRODUCTION on my dev setup!

12 minutes ago, adrian said:
'forceIsLocal' => true,

Great! That works and solves my problem ? I'm using different configs for dev/production so that's a perfect solution ?

  • Like 1
  • bernhard changed the title to [solved] Request: Add option to define development host
Posted

Glad that solution works for you. I suppose DDEV is doing something unusual in regards to the normal 127.0.0.1 for localhost that must be messing with the isLocal() detection.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...