File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 88from  flask  import  Flask 
99from  service  import  config 
1010from  service .common  import  log_handlers 
11+ from  flask_talisman  import  Talisman 
12+ from  flask_cors  import  CORS 
1113
1214# Create Flask application 
1315app  =  Flask (__name__ )
16+ talisman  =  Talisman (app )
17+ CORS (app )
1418app .config .from_object (config )
1519
1620# Import the routes After the Flask app is created 
2428log_handlers .init_logging (app , "gunicorn.error" )
2529
2630app .logger .info (70  *  "*" )
27- app .logger .info ("  A C C O U N T   S E R V I C E   R U N N I N G  " .center (70 , "*" ))
31+ app .logger .info (
32+     "  A C C O U N T   S E R V I C E   R U N N I N G  " .center (70 , "*" ))
2833app .logger .info (70  *  "*" )
2934
3035try :
Original file line number Diff line number Diff line change 1- from  flask  import  Flask 
2- from  flask_talisman  import  Talisman 
3- 
4- app  =  Flask (__name__ )
5- talisman  =  Talisman (app )
6- 
7- # export talisman so tests can import it 
8- __all__  =  ['app' , 'talisman' ]
Original file line number Diff line number Diff line change 1313from  service .models  import  db , Account , init_db 
1414from  service .routes  import  app 
1515from  service  import  talisman 
16- HTTPS_ENVIRON  =  {'wsgi.url_scheme' : 'https' }
1716
1817DATABASE_URI  =  os .getenv (
1918    "DATABASE_URI" , "postgresql://postgres:postgres@localhost:5432/postgres" 
2019)
2120
2221BASE_URL  =  "/accounts" 
22+ HTTPS_ENVIRON  =  {'wsgi.url_scheme' : 'https' }
2323
2424
2525###################################################################### 
@@ -190,4 +190,3 @@ def test_cors_security(self):
190190        # Check for the CORS header 
191191        self .assertEqual (response .headers .get (
192192            'Access-Control-Allow-Origin' ), '*' )
193- 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments