Skip to content

Instantly share code, notes, and snippets.

@fwartner
Created May 5, 2020 13:46
Show Gist options
  • Save fwartner/2ff5bc7d712091aa416635e9049f0db8 to your computer and use it in GitHub Desktop.
Save fwartner/2ff5bc7d712091aa416635e9049f0db8 to your computer and use it in GitHub Desktop.
Codeteach.io Custom Domains
{
        on_demand_tls {
                ask https://caddy.codeteach.io/allowed-domain
        }
}
http {
        redir http:// https://{host}{uri}
}
https:// {
        tls [email protected] {
                on_demand
        }
        reverse_proxy * https://codeteach.io {
                header_up Host {host}.codeteach.io
header_up X-Real-IP {remote}
                header_up Codeteach-Custom-Domain {host}
                header_up X-Forwarded-Port {server_port}
                header_up X-Forwarded-Proto {scheme}
                health_timeout 10s
        }
}
Route::domain('{domain}.' . config('codeteach.app_domain'))->group(function () {
Route::get('/', 'Courses\CourseLandingController@getLandingpage');
Route::get('/enroll', 'Courses\CourseLandingController@enrollToCourse');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment