app

package
v0.0.0-...-663ef3c Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Gorm *gorm.DB

Gorm: the database instance

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")

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

TODO turn this into revel.HeaderFilter should probably also have a filter for CSRF not sure if it can go in the same filter or not

View Source
var Redis *redis.Client

Redis: the redis instance

Functions

func InitDB

func InitDB()

InitDB: 初始化数据库

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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