Skip to content

Plugin - DisablesSSLVerification #294

Description

@jdc1898

I know it is discouraged however, there are certain circumstances that disabling SSL checks are required. In case anyone needs a plugin in v2, here is how I did it.

use Saloon\Contracts\PendingRequest;

trait DisablesSSLVerification
{
    /**
     * Disable SSL verification on requests. I hope you know this is bad.
     *
     * @param \Saloon\Contracts\PendingRequest $pendingRequest
     * @return void
     */
    public function bootDisablesSSLVerification(PendingRequest $pendingRequest): void
    {
        $pendingRequest->config()->merge([
            'verify' => false,
        ]);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions