[GH-ISSUE #540] Let's Encrypt/HTTPS integration? #384

Closed
opened 2026-02-26 02:33:02 +03:00 by kerem · 3 comments
Owner

Originally created by @o355 on GitHub (Feb 14, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/540

Hi! Another idea from the mouth of mine.

I'm wondering (as I'm a horrible person) if HTTPS can be integrated with Koel, through a proxy, or whatnot. I've heard of doing proxies behind other programs, but all the terminology just confuses me.

I'd also like to suggest somehow integrating HTTPS easily into Koel (Let's Encrypt or pre-issued SSL certs), so users streaming over the internet can securely log in. Just a suggestion.

Originally created by @o355 on GitHub (Feb 14, 2017). Original GitHub issue: https://github.com/koel/koel/issues/540 Hi! Another idea from the mouth of mine. I'm wondering (as I'm a horrible person) if HTTPS can be integrated with Koel, through a proxy, or whatnot. I've heard of doing proxies behind other programs, but all the terminology just confuses me. I'd also like to suggest somehow integrating HTTPS easily into Koel (Let's Encrypt or pre-issued SSL certs), so users streaming over the internet can securely log in. Just a suggestion.
kerem closed this issue 2026-02-26 02:33:02 +03:00
Author
Owner

@phanan commented on GitHub (Feb 14, 2017):

As much as I'm a fan of Let's Encrypt and service workers, I don't think this is within Koel's scope. You're free to configure your server however you want. My own Koel settings have Nginx proxying Apache over SSL.

<!-- gh-comment-id:279590414 --> @phanan commented on GitHub (Feb 14, 2017): As much as I'm a fan of Let's Encrypt and service workers, I don't think this is within Koel's scope. You're free to configure your server however you want. My own Koel settings have Nginx proxying Apache over SSL.
Author
Owner

@aa6my commented on GitHub (Jun 11, 2017):

Btw you can forceSchema to https and include use Illuminate\Support\Facades\URL; in app/Providers/AppServiceProvider.php

And mine also successfully integrate with cloudflare. https://github.com/phanan/koel/blob/master/nginx.conf.example

        if ($http_x_forwarded_proto = "http") {
            return 301 https://$server_name$request_uri;
            # rewrite ^ https://$server_name$request_uri?  permanent;
        }
<?php

namespace App\Providers;

use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        URL::forceSchema("https"); //force HTTPS schema
        // Add some custom validation rules
        Validator::extend('path.valid', function ($attribute, $value, $parameters, $validator) {
            return is_dir($value) && is_readable($value);
        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
<!-- gh-comment-id:307608729 --> @aa6my commented on GitHub (Jun 11, 2017): Btw you can **forceSchema** to **https** and include use **Illuminate\Support\Facades\URL;** in app/Providers/AppServiceProvider.php And mine also successfully integrate with cloudflare. https://github.com/phanan/koel/blob/master/nginx.conf.example ``` if ($http_x_forwarded_proto = "http") { return 301 https://$server_name$request_uri; # rewrite ^ https://$server_name$request_uri? permanent; } ``` ``` <?php namespace App\Providers; use Illuminate\Support\Facades\Validator; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\URL; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { URL::forceSchema("https"); //force HTTPS schema // Add some custom validation rules Validator::extend('path.valid', function ($attribute, $value, $parameters, $validator) { return is_dir($value) && is_readable($value); }); } /** * Register any application services. * * @return void */ public function register() { // } } ```
Author
Owner

@alashow commented on GitHub (Jun 30, 2017):

@aa6my I believe it's forceScheme and not forceSchema

<!-- gh-comment-id:312344732 --> @alashow commented on GitHub (Jun 30, 2017): @aa6my I believe it's `forceScheme` and not `forceSchema`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#384
No description provided.