app

package
v0.0.0-...-c8feaad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AppVersion revel app version (ldflags)
	AppVersion string

	// BuildTime revel app build-time (ldflags)
	BuildTime string

	// RethinkDBSession rethinkdb session handle for the application
	RethinkDBSession *rethinkdb.Session

	// Services map of application services
	Services *AppServices
)
View Source
var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
	c.Response.Out.Header().Add("X-Frame-Options", "SAMEORIGIN")
	c.Response.Out.Header().Add("X-XSS-Protection", "1; mode=block")
	c.Response.Out.Header().Add("X-Content-Type-Options", "nosniff")
	c.Response.Out.Header().Add("Referrer-Policy", "strict-origin-when-cross-origin")

	fc[0](c, fc[1:])
}

HeaderFilter adds common security headers There is a full implementation of a CSRF filter in https://github.com/revel/modules/tree/master/csrf

Functions

func InitDB

func InitDB()

func RegisterServices

func RegisterServices()

Types

type AppServices

type AppServices struct {
	ArtifactService     *services.ArtifactService
	AuthService         *services.AuthService
	ItemService         *services.ItemService
	LibraryService      *services.LibraryService
	OrganizationService *services.OrganizationService
	RoleService         *services.RoleService
	UserService         *services.UserService
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL