File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 3737before do
3838 if request . path_info == '/auth'
3939 return
40+ #any route on the main domain
41+ elsif request . url . include? Settings . mainURL
42+ return
4043 else
4144 auth ( )
4245 end
5962 else
6063 redirect '/'
6164 end
62- end
65+ end
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ def call(env)
99 params = request . params
1010 puts params
1111 if session [ :auth ] != true
12- if url == Settings . mainURL
13- session [ :auth ] = true
14- session [ :uid ] = SecureRandom . alphanumeric ( 2048 )
15- return [ 302 , { 'Location' => '/' } , [ ] ]
16- elsif Settings . private == "false" && params [ 'unlock' ] == '' || params [ 'unlock' ] == 'unlock' || params [ 'unlock' ] == 'true' || params [ 'unlock' ] == ' '
12+ # if url == Settings.mainURL
13+ # session[:auth] = true
14+ # session[:uid] = SecureRandom.alphanumeric(2048)
15+ # return [302, {'Location' => '/'}, []]
16+ if Settings . private == "false" && params [ 'unlock' ] == '' || params [ 'unlock' ] == 'unlock' || params [ 'unlock' ] == 'true' || params [ 'unlock' ] == ' '
1717 session [ :auth ] = true
1818 session [ :uid ] = SecureRandom . alphanumeric ( 2048 )
1919 return [ 302 , { 'Location' => '/' } , [ ] ]
@@ -24,6 +24,6 @@ def call(env)
2424end
2525def auth
2626 if session [ :auth ] != true
27- halt erb :'edu/v1/index' , :layout => :"layouts/index"
27+ halt erb :'edu/v1/index'
2828 end
2929end
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ if (userVersion != latestRelease.version || userVersion == null || userVersion =
1212 localStorage . setItem ( 'updated' , true ) ;
1313 localStorage . setItem ( 'version' , latestRelease . version ) ;
1414 uninstallAllSW ( ) ;
15- }
15+ }
You can’t perform that action at this time.
0 commit comments