| Author | Dave Jarvis <email> |
|---|---|
| Date | 2026-02-16 01:01:18 GMT-0800 |
| Commit | 7e6c266a3be82322c7ce71ab7b2dc700a585be04 |
| Parent | afffc2d |
| public function render() { | ||
| + if( $this->subPath === '' ) { | ||
| + $this->redirectBrowser(); | ||
| + return; | ||
| + } | ||
| + | ||
| if( str_ends_with( $this->subPath, 'info/refs' ) ) { | ||
| $this->renderInfoRefs(); | ||
| http_response_code( 404 ); | ||
| echo "Not Found"; | ||
| + exit; | ||
| + } | ||
| + | ||
| + private function redirectBrowser(): void { | ||
| + $uiUrl = str_replace( '.git', '', $_SERVER['REQUEST_URI'] ); | ||
| + header( "Location: $uiUrl" ); | ||
| exit; | ||
| } | ||
| Delta | 11 lines added, 0 lines removed, 11-line increase |
|---|