Configuration variables

API application

Environment Variable
Default Value
Description

CI_ENVIRONMENT

development

The current environment mode (development, testing, production).

app.baseURL

http://localhost:8000

The base URL for the application.

app.indexPage

index.php

The index page of the application.

app.appTitle

MyApp

The title of the application displayed in the browser.

session.driver

CodeIgniter\Session\Handlers\RedisHandler

Session driver used for storing session data.

session.cookieName

myapp_session

Name of the session cookie.

session.expiration

3600

Session expiration time in seconds.

session.matchIP

true

Whether to match the IP address for session data.

session.timeToUpdate

600

How often to regenerate the session ID.

session.regenerateDestroy

true

Whether to destroy session data on regeneration.

database.default.hostname

db_host

Database server hostname.

database.default.database

mydatabase

Name of the database.

database.default.username

admin

Database username.

database.default.password

password

Database password.

database.default.DBDriver

MySQL

Database driver type.

database.default.port

3306

Port number for the database connection.

cors.allowedHeaders

Content-Type, Authorization

List of allowed headers for CORS.

cors.allowedOrigins

https://example.com

List of allowed origins for CORS.

cors.allowedMethods

GET, POST, PUT

HTTP methods allowed for CORS.

cors.credentials

false

Sets whether CORS requests can include credentials like cookies or HTTP authentication.

email.fromEmail

noreply@example.com

The default sender's email address for outgoing emails.

email.fromName

MyApp Support

The name that appears as the sender of the email.

email.protocol

mail

Email sending protocol used (mail, sendmail, smtp).

email.SMTPHost

smtp.example.com

SMTP server address.

email.SMTPUser

user@example.com

SMTP authentication username.

email.SMTPPass

securepassword

SMTP authentication password.

email.SMTPPort

587

Port number for the SMTP server.

email.SMTPCrypto

tls

The crypto method used for SMTP (tls, ssl, or empty for none).

email.mailType

text

The email type format (text or html).

auth.autoLogin

false

Whether to automatically log in a user after registration.

auth.useMagicLinkFormTitle

Enter your email to receive a magic link.

The title of the form asking for an email to send a login magic link.

auth.systemBotPassword

securebotpassword

Password used by the system bot for authentication.

geocode_mapbox_api.key

pk.abcdefg123456

API key for accessing mapbox geocode services.

logger.threshold

1

The error logging threshold (0 = off, 1 = error, 2 = debug, etc.).

people.remoteSyncUrl

https://api.example.com/sync

URL for synchronizing remote people data.

people.remoteSyncAccessToken

abcdef123456

Access token used for authenticating remote sync requests.

data_providers.news.url

https://news.example.com/api

URL for fetching news related data from external providers.

elasticSearch.host

search.example.com

Host address for the Elasticsearch server.

cache.disabled

false

Whether caching is disabled (true or false).

Last updated