dpugulo commented on issue #5039: [Ready]Allow domain-sharding option for 
dashboard
URL: 
https://github.com/apache/incubator-superset/pull/5039#issuecomment-597624989
 
 
   hi,
   i setted SUPERSET_WEBSERVER_DOMAINS in custom config file but no change...
   
   
![image](https://user-images.githubusercontent.com/55461451/76420462-32c09880-63b3-11ea-8207-47032e900e1c.png)
   
   
   my config file completely----------
   
   import logging
   import os
   
   #orjinal
   #from werkzeug.contrib.cache import FileSystemCache
   
   
   logger = logging.getLogger()
   
   
   def get_env_variable(var_name, default=None):
       """Get the environment variable or raise exception."""
       try:
           return os.environ[var_name]
       except KeyError:
           if default is not None:
               return default
           else:
               error_msg = "The environment variable {} was missing, 
abort...".format(
                   var_name
               )
               raise EnvironmentError(error_msg)
   
   
   DATABASE_DIALECT = get_env_variable("DATABASE_DIALECT")
   DATABASE_USER = get_env_variable("DATABASE_USER")
   DATABASE_PASSWORD = get_env_variable("DATABASE_PASSWORD")
   DATABASE_HOST = get_env_variable("DATABASE_HOST")
   DATABASE_PORT = get_env_variable("DATABASE_PORT")
   DATABASE_DB = get_env_variable("DATABASE_DB")
   
   # The SQLAlchemy connection string.
   SQLALCHEMY_DATABASE_URI = "%s://%s:%s@%s:%s/%s" % (
       DATABASE_DIALECT,
       DATABASE_USER,
       DATABASE_PASSWORD,
       DATABASE_HOST,
       DATABASE_PORT,
       DATABASE_DB,
   )
   #SQLALCHEMY_DATABASE_URI = SUPERSET_SQLALCHEMY_DATABASE_URI
   SQLALCHEMY_TRACK_MODIFICATIONS = True
   #SECRET_KEY = 'thisISaSECRET_1234'
   
   
   
   
   REDIS_HOST = get_env_variable("REDIS_HOST")
   REDIS_PORT = get_env_variable("REDIS_PORT")
   
   
   #orjinal
   #RESULTS_BACKEND = FileSystemCache('/app/superset_home/sqllab')
   
   # On Redis
   from werkzeug.contrib.cache import RedisCache
   RESULTS_BACKEND = RedisCache(
       host=REDIS_HOST, port=REDIS_PORT, key_prefix='superset_results')
   
   
   CACHE_CONFIG = {
       'CACHE_TYPE': 'redis',
       'CACHE_DEFAULT_TIMEOUT': 60*60*24*365,
       'CACHE_KEY_PREFIX': 'superset_',
       'CACHE_REDIS_HOST': REDIS_HOST,
       'CACHE_REDIS_PORT': REDIS_PORT,
       'CACHE_REDIS_DB': 1,
       'CACHE_REDIS_URL': 'redis://redis:6379/1'
       }
   
   
   class CeleryConfig(object):
       BROKER_URL = "redis://%s:%s/0" % (REDIS_HOST, REDIS_PORT)
       CELERY_IMPORTS = ("superset.sql_lab",)
       CELERY_RESULT_BACKEND = "redis://%s:%s/1" % (REDIS_HOST, REDIS_PORT)
       CELERY_ANNOTATIONS = {"tasks.add": {"rate_limit": "100/s"}} 
       CELERY_TASK_PROTOCOL = 1
   
   
   CELERY_CONFIG = CeleryConfig
   
   
   
   # Flask-WTF flag for CSRF
   WTF_CSRF_ENABLED = True
   # Add endpoints that need to be exempt from CSRF protection
   WTF_CSRF_EXEMPT_LIST = []
   # A CSRF token that expires in 1 yea
   WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365
   
   #Flask-WTF flag for CSRF
   CSRF_ENABLED = True
   
   #superset client bağlantıı içibn
   ENABLE_CORS = True
   
   CORS_OPTIONS = {
       'supports_credentials': True,
       'allow_headers': [
           'X-CSRFToken', 'Content-Type', 'Origin', 'X-Requested-With', 
'Accept',
       ],
       'resources': [
                '/superset/csrf_token/' , 
                '/api/v1/formData/',  
                '/superset/explore_json/*',  
                '/api/v1/query/',  
                '/superset/fetch_datasource_metadata/'  
                '/superset/explore_json/',  
                '/superset/log/*'            
           ],
       'origins': [
                   ,'rapor.test'
                ,'172.17.0.1:8088'
                ,'0.0.0.0:8088'
                ,'*'
                ],
   }
   
   HTTP_HEADERS = {'X-Frame-Options': 'ALLOWALL'}
   
   #SESSION_COOKIE_HTTPONLY = False  
   SESSION_COOKIE_SECURE = False  
   SESSION_COOKIE_SAMESITE =  None 
   
   PUBLIC_ROLE_LIKE_GAMMA = True
   AUTH_ROLE_PUBLIC = 'Public' 
   AUTH_USER_REGISTRATION_ROLE = "Public"
   
   
   FAB_UPDATE_PERMS = False
   
   
   APP_NAME = "Rapor"
   
   APP_ICON = "/static/assets/images/gdu-logo2.png"
   APP_ICON_WIDTH = 100
   
   SQLALCHEMY_POOL_SIZE=40
   SQLALCHEMY_POOL_TIMEOUT=600
   
   
   SQLLAB_ASYNC_TIME_LIMIT_SEC = 60 * 60 * 6
   SUPERSET_WEBSERVER_TIMEOUT = 6000
   
   
   
   
   SUPERSET_WEBSERVER_DOMAINS = ['0.0.0.0']
   
   #
   try:
       from superset_config_docker import *  # noqa
       import superset_config_docker
   
       logger.info(
           f"Loaded your Docker configuration at " 
f"[{superset_config_docker.__file__}]"
       )
   except ImportError:
       logger.info("Using default Docker config...")
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to