mirror of https://github.com/Bubka/2FAuth.git
Default ASSET_URL to APP_URL - Fixes #284
This commit is contained in:
parent
1e3cb32bc2
commit
406f0095ea
|
@ -36,10 +36,10 @@ APP_URL=http://localhost
|
||||||
|
|
||||||
|
|
||||||
# If you want to serve js assets from a CDN (like https://cdn.example.com),
|
# If you want to serve js assets from a CDN (like https://cdn.example.com),
|
||||||
# you need to set this custom URL here.
|
# uncomment the following line and set this var with the CDN url.
|
||||||
# Otherwise, this should be the exact same value as APP_URL.
|
# Otherwise, let this line commented.
|
||||||
|
|
||||||
ASSET_URL=http://localhost
|
# ASSET_URL=http://localhost
|
||||||
|
|
||||||
|
|
||||||
# The domain subdirectory from which you want to serve 2FAuth.
|
# The domain subdirectory from which you want to serve 2FAuth.
|
||||||
|
|
|
@ -125,9 +125,10 @@ ENV \
|
||||||
# Webauthn won't work otherwise.
|
# Webauthn won't work otherwise.
|
||||||
APP_URL=http://localhost \
|
APP_URL=http://localhost \
|
||||||
# If you want to serve js assets from a CDN (like https://cdn.example.com),
|
# If you want to serve js assets from a CDN (like https://cdn.example.com),
|
||||||
# you need to set this custom URL here.
|
# uncomment the following line and set this var with the CDN url.
|
||||||
# Otherwise, this should be the exact same value as APP_URL.
|
# Otherwise, let this line commented.
|
||||||
ASSET_URL=http://localhost \
|
# ASSET_URL=http://localhost \
|
||||||
|
#
|
||||||
# Turn this to true if you want your app to react like a demo.
|
# Turn this to true if you want your app to react like a demo.
|
||||||
# The Demo mode reset the app content every hours and set a generic demo user.
|
# The Demo mode reset the app content every hours and set a generic demo user.
|
||||||
IS_DEMO_APP=false \
|
IS_DEMO_APP=false \
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
use Illuminate\Support\Facades\Facade;
|
use Illuminate\Support\Facades\Facade;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
$appUrl = env('APP_URL', env('HEROKU_APP_NAME') ? 'https://' . env('HEROKU_APP_NAME') . '.herokuapp.com' : 'http://localhost');
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -55,9 +57,9 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => env('APP_URL', env('HEROKU_APP_NAME') ? 'https://' . env('HEROKU_APP_NAME') . '.herokuapp.com' : 'http://localhost'),
|
'url' => $appUrl,
|
||||||
|
|
||||||
'asset_url' => env('ASSET_URL', null),
|
'asset_url' => env('ASSET_URL', $appUrl),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -25,9 +25,10 @@ services:
|
||||||
# Webauthn won't work otherwise.
|
# Webauthn won't work otherwise.
|
||||||
- APP_URL=http://localhost
|
- APP_URL=http://localhost
|
||||||
# If you want to serve js assets from a CDN (like https://cdn.example.com),
|
# If you want to serve js assets from a CDN (like https://cdn.example.com),
|
||||||
# you need to set this custom URL here.
|
# uncomment the following line and set this var with the CDN url.
|
||||||
# Otherwise, this should be the exact same value as APP_URL.
|
# Otherwise, let this line commented.
|
||||||
- ASSET_URL=http://localhost
|
# - ASSET_URL=http://localhost
|
||||||
|
#
|
||||||
# Turn this to true if you want your app to react like a demo.
|
# Turn this to true if you want your app to react like a demo.
|
||||||
# The Demo mode reset the app content every hours and set a generic demo user.
|
# The Demo mode reset the app content every hours and set a generic demo user.
|
||||||
- IS_DEMO_APP=false
|
- IS_DEMO_APP=false
|
||||||
|
|
Loading…
Reference in New Issue