| 
									
										
										
										
											2021-10-27 05:04:18 +08:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-31 04:29:59 +08:00
										 |  |  | namespace BookStack\Http\Middleware; | 
					
						
							| 
									
										
										
										
											2021-10-27 05:04:18 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | use Illuminate\Http\Middleware\TrustHosts as Middleware; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class TrustHosts extends Middleware | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Get the host patterns that should be trusted. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2024-03-16 23:12:14 +08:00
										 |  |  |      * @return array<int, string|null> | 
					
						
							| 
									
										
										
										
											2021-10-27 05:04:18 +08:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2024-03-16 23:12:14 +08:00
										 |  |  |     public function hosts(): array | 
					
						
							| 
									
										
										
										
											2021-10-27 05:04:18 +08:00
										 |  |  |     { | 
					
						
							|  |  |  |         return [ | 
					
						
							|  |  |  |             $this->allSubdomainsOfApplicationUrl(), | 
					
						
							|  |  |  |         ]; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |