This repository was archived by the owner on Mar 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed
Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -216,10 +216,17 @@ private function checkConfiguration(array $config)
216216 * @return string
217217 */
218218 private function getBaseUrl ()
219- {
220- return sprintf ("%s://%s " ,
221- isset ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] != 'off ' ? 'https ' : 'http ' ,
222- $ _SERVER ['HTTP_HOST ' ]
223- );
219+ {
220+ if (is_null ($ this ->config ['base_url ' ]) || (trim ($ this ->config ['base_url ' ]) == '' ))
221+ {
222+ return sprintf ("%s://%s " ,
223+ isset ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] != 'off ' ? 'https ' : 'http ' ,
224+ $ _SERVER ['HTTP_HOST ' ]
225+ );
226+ }
227+ else
228+ {
229+ return $ this ->config ['base_url ' ];
230+ }
224231 }
225- }
232+ }
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ public function register()
4242 'css_build_path ' => Config::get ('minify::css_build_path ' ),
4343 'js_build_path ' => Config::get ('minify::js_build_path ' ),
4444 'ignore_environments ' => Config::get ('minify::ignore_environments ' ),
45+ 'base_url ' => Config::get ('minify::base_url ' ),
4546 ),
4647 $ app ->environment ()
4748 );
Original file line number Diff line number Diff line change 4444
4545 'js_build_path ' => '/js/builds/ ' ,
4646
47- );
47+ /*
48+ |--------------------------------------------------------------------------
49+ | Base URL
50+ |--------------------------------------------------------------------------
51+ |
52+ | You can set the base URL for the links generated with the configuration
53+ | value. By default if empty HTTP_HOST would be used.
54+ |
55+ */
56+ 'base_url ' => ''
57+ );
You can’t perform that action at this time.
0 commit comments