Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Support tls:// scheme when using url in Redis config #33800

Merged
merged 3 commits into from
Aug 10, 2020

Conversation

tillkruss
Copy link
Contributor

@tillkruss tillkruss commented Aug 9, 2020

Currently, the protocol can't be specified when using the Redis url configuration. The config below would connect via TCP without any warning.

return [

    'redis' => [

        'client' => env('REDIS_CLIENT', 'phpredis'),

        'default' => [
            'url' => 'tls://127.0.0.1:6379?database=0',
        ],
    ],

];

This PR adds support to specify protocols:

return [
    'default' => [
        'url' => 'redis://127.0.0.1:6379?database=0', // scheme is ignored, connect via TCP
    ],

    'cache' => [
        'url' => 'tcp://127.0.0.1:6379?database=1', // connect via TCP
    ],

    'sessions' => [
        'url' => 'tls://127.0.0.1:6379?database=2', // connect via TLS
    ],
];

@tillkruss tillkruss changed the title Support tls:// scheme when using url in Redis config [7.x] Support tls:// scheme when using url in Redis config Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants