コード例 #1
0
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = get_configurator(global_config, **settings)
    app = config.make_wsgi_app()
    refreshListsConfigThread = RefreshListsConfigThread(
        config.registry.settings.get('shavar.refresh_lists_delay',
                                     DEFAULT_REFRESH_LISTS_DELAY), config)
    refreshListsConfigThread.daemon = True
    refreshListsConfigThread.start()
    return app
コード例 #2
0
ファイル: __init__.py プロジェクト: riadhchtara/syncserver
def main(global_config, **settings):
    """Load a SyncStorage WSGI app from deployment settings."""
    config = get_configurator(global_config, **settings)
    application = AccessControlMiddleware(
        config.make_wsgi_app(), allow_origin='*',
        allow_methods=('GET','POST','PUT','DELETE','OPTIONS'),
        allow_headers=('X-Authorization', 'Authorization',
                       'X-If-Modified-Since', 'X-If-Unmodified-Since',
                       'Content-Type', 'X-Requested-With', 'X-Client-State'),
        expose_headers=('X-Weave-Timestamp', 'X-Weave-Backoff',
                        'X-Weave-Alert', 'X-Weave-Records'))
    return application
コード例 #3
0
ファイル: __init__.py プロジェクト: mozilla-services/shavar
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = get_configurator(global_config, **settings)
    app = config.make_wsgi_app()
    refreshListsConfigThread = RefreshListsConfigThread(
        config.registry.settings.get(
            'shavar.refresh_lists_delay', DEFAULT_REFRESH_LISTS_DELAY
        ),
        config
    )
    refreshListsConfigThread.daemon = True
    refreshListsConfigThread.start()
    return app
コード例 #4
0
def main(global_config={}, **settings):
    """Load a SyncStorage WSGI app from deployment settings."""
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
コード例 #5
0
def main(global_config, **settings):
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
コード例 #6
0
def main(global_config, **settings):
    """Load a SyncStorage WSGI app from deployment settings."""
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
コード例 #7
0
ファイル: __init__.py プロジェクト: rbillings/shavar
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()
コード例 #8
0
ファイル: __init__.py プロジェクト: mozilla/trunion
def main(global_config, **settings):
    config = get_configurator(global_config, **settings)
    return config.make_wsgi_app()