Created
May 5, 2020 13:46
-
-
Save fwartner/2ff5bc7d712091aa416635e9049f0db8 to your computer and use it in GitHub Desktop.
Codeteach.io Custom Domains
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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 | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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