Search code examples
dockerdreamfactory

DreamFactory how to disable wrapper "resource" in docker container


I'm using DreamFactory REST API in a Docker container and I need to disable wrapper "resource" in payload. How can I achieve this?

I have replaced the following in all of these four files:

opt/bitnami/dreamfactory/.env-dist
opt/bitnami/dreamfactory/vendor/dreamfactory/df-core/config/df.php
opt/bitnami/dreamfactory/installer.sh
bitnami/dreamfactory/.env

DF_ALWAYS_WRAP_RESOURCES=true

with:

DF_ALWAYS_WRAP_RESOURCES=false

but this doesn't fix my problem.


Solution

  • The change you describe is indeed the correct one as found in the DreamFactory wiki. Therefore I suspect the configuration has been cached. Navigate to your DreamFactory project's root directory and run this command:

    $ php artisan config:clear
    

    This will wipe out any cached configuration settings and force DreamFactory to read the .env file in anew. Also, keep in mind you only need to change the .env file (or manage your configuration variables in your server environment). Those other files won't play any role in configuration changes.