mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Merge pull request #700 from paperless-ngx/fix-healthcheck
add "localhost" to ALLOWED_HOSTS
This commit is contained in:
		@@ -170,6 +170,9 @@ PAPERLESS_ALLOWED_HOSTS=<comma-separated-list>
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Can also be set using PAPERLESS_URL (see above).
 | 
					    Can also be set using PAPERLESS_URL (see above).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    If manually set, please remember to include "localhost". Otherwise docker
 | 
				
			||||||
 | 
					    healthcheck will fail.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Defaults to "*", which is all hosts.
 | 
					    Defaults to "*", which is all hosts.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PAPERLESS_CORS_ALLOWED_HOSTS=<comma-separated-list>
 | 
					PAPERLESS_CORS_ALLOWED_HOSTS=<comma-separated-list>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -251,7 +251,8 @@ if _paperless_url:
 | 
				
			|||||||
    if _allowed_hosts:
 | 
					    if _allowed_hosts:
 | 
				
			||||||
        ALLOWED_HOSTS.append(_paperless_uri.hostname)
 | 
					        ALLOWED_HOSTS.append(_paperless_uri.hostname)
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        ALLOWED_HOSTS = [_paperless_uri.hostname]
 | 
					        # always allow localhost. Necessary e.g. for healthcheck in docker.
 | 
				
			||||||
 | 
					        ALLOWED_HOSTS = [_paperless_uri.hostname] + ["localhost"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# The secret key has a default that should be fine so long as you're hosting
 | 
					# The secret key has a default that should be fine so long as you're hosting
 | 
				
			||||||
# Paperless on a closed network.  However, if you're putting this anywhere
 | 
					# Paperless on a closed network.  However, if you're putting this anywhere
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user