forked from open-webui/open-webui
		
	feat: set first user to admin by default
This commit is contained in:
		
							parent
							
								
									07d2c9871f
								
							
						
					
					
						commit
						83ff1d77ea
					
				
					 8 changed files with 28 additions and 25 deletions
				
			
		|  | @ -9,7 +9,7 @@ import json | |||
| from apps.web.models.users import Users | ||||
| from constants import ERROR_MESSAGES | ||||
| from utils.utils import extract_token_from_auth_header | ||||
| from config import OLLAMA_API_BASE_URL, OLLAMA_WEBUI_AUTH | ||||
| from config import OLLAMA_API_BASE_URL, WEBUI_AUTH | ||||
| 
 | ||||
| app = Flask(__name__) | ||||
| CORS( | ||||
|  | @ -32,7 +32,7 @@ def proxy(path): | |||
|     headers = dict(request.headers) | ||||
| 
 | ||||
|     # Basic RBAC support | ||||
|     if OLLAMA_WEBUI_AUTH: | ||||
|     if WEBUI_AUTH: | ||||
|         if "Authorization" in headers: | ||||
|             token = extract_token_from_auth_header(headers["Authorization"]) | ||||
|             user = Users.get_user_by_token(token) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek