Skip to content

Commit

Permalink
hashid-key env var (apiato#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesschobel authored Mar 15, 2018
1 parent e7bd634 commit 25eeea9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ API_URL=http://api.apiato.dev
APP_KEY=

HASH_ID=true
HASH_ID_KEY=
HASH_ID_LENGTH=16

API_RATE_LIMIT_ENABLED=true
Expand Down
22 changes: 19 additions & 3 deletions .env.travis
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,49 @@ APP_DEBUG=true
API_DEBUG=true
REQUESTS_DEBUG=false
QUERIES_DEBUG=false
DEBUGBAR_ENABLED=false

APP_LOG_LEVEL=debug
LOG_CHANNEL=stack

APP_NAME="apiato"
APP_URL=http://apiato.dev
API_URL=http://api.apiato.dev

APP_KEY=

HASH_ID=false
HASH_ID_KEY=
HASH_ID_LENGTH=16

API_RATE_LIMIT_ENABLED=true
API_RATE_LIMIT_ATTEMPTS=30
API_RATE_LIMIT_EXPIRES=1

API_REQUEST_APPLY_REQUEST_CRITERIA=true

PAGINATION_LIMIT_DEFAULT=10
PAGINATION_SKIP=false

API_TOKEN_EXPIRES=1440
API_REFRESH_TOKEN_EXPIRES=43200
API_ENABLE_IMPLICIT_GRANT=true
API_RESPONSE_SERIALIZER=League\Fractal\Serializer\DataArraySerializer

ELOQUENT_QUERY_CACHE=false
ELOQUENT_QUERY_CACHE_TIME=60
ROOT_NAMESPACE=App\
USER_NAMESPACE=App\Containers\User\Models\

SRC_PATH=app

ROOT_NAMESPACE=App\
USER_NAMESPACE=App\Containers\User\Models\

DB_CONNECTION=mysql
QUEUE_DRIVER=sync
CACHE_DRIVER=array
SESSION_DRIVER=array
BROADCAST_DRIVER=log

FILESYSTEM_DRIVER=local

DB_HOST=localhost
DB_PORT=3306
Expand All @@ -48,6 +62,8 @@ QUEUE_HOST=localhost
QUEUE_DEFAULT=default
QUEUE_RETRY_AFTER=90

SESSION_COOKIE=apiato

MAIL_ENABLED=true
MAIL_DRIVER=log
MAIL_FROM_ADDRESS=test@test.test
Expand Down
2 changes: 1 addition & 1 deletion app/Ship/Configs/hashids.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
'connections' => [

'main' => [
'salt' => env('APP_KEY'),
'salt' => env('HASH_ID_KEY', env('APP_KEY')),
'length' => env('HASH_ID_LENGTH', 32),
'alphabet' => '1234567890abcdefghijklmnopqrstuvwxyz',
],
Expand Down

0 comments on commit 25eeea9

Please sign in to comment.