gws.web.site

class gws.web.site.CorsConfig(*args, **kwargs)[source]
allowOrigin = '*'
allowCredentials = False
class gws.web.site.CorsOptions(*args, **kwargs)[source]
class gws.web.site.RewriteRule(*args, **kwargs)[source]
match = None

expression to match the url against

target = None

target url with placeholders

options = None

additional options

class gws.web.site.DocumentRootConfig(*args, **kwargs)[source]

Base directory for assets

dir = None

directory path

allowMime = None

allowed mime types

denyMime = None

disallowed mime types (from the standard list)

class gws.web.site.DocumentRoot(*args, **kwargs)[source]
class gws.web.site.Config(*args, **kwargs)[source]

Site (virtual host) configuration

assets = None

assets location and options

cors = None

cors configuration

errorPage = None

error page template

host = '*'

host name

rewrite = None

rewrite rules

reversedHost = ''

hostname for reversed rewriting

reversedRewrite = None

reversed rewrite rules

root = None

document root location and options

gws.web.site.document_root(cfg: gws.web.site.DocumentRootConfig) → Optional[gws.types.DocumentRoot][source]
class gws.web.site.Object[source]
configure()[source]
url_for(req, url)[source]