Skip to content

Commit

Permalink
Merge pull request #15 for v0.10 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm authored Oct 3, 2017
2 parents 14ed79c + e4102f3 commit 30fc4da
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# router - aah framework
[![Build Status](https://travis-ci.org/go-aah/router.svg?branch=master)](https://travis-ci.org/go-aah/router) [![codecov](https://codecov.io/gh/go-aah/router/branch/master/graph/badge.svg)](https://codecov.io/gh/go-aah/router/branch/master) [![Go Report Card](https://goreportcard.com/badge/aahframework.org/router.v0)](https://goreportcard.com/report/aahframework.org/router.v0) [![Version](https://img.shields.io/badge/version-0.9-blue.svg)](https://github.com/go-aah/router/releases/latest) [![GoDoc](https://godoc.org/aahframework.org/router.v0?status.svg)](https://godoc.org/aahframework.org/router.v0) [![License](https://img.shields.io/github/license/go-aah/router.svg)](LICENSE) [![Twitter](https://img.shields.io/badge/twitter-@aahframework-55acee.svg)](https://twitter.com/aahframework)
[![Build Status](https://travis-ci.org/go-aah/router.svg?branch=master)](https://travis-ci.org/go-aah/router) [![codecov](https://codecov.io/gh/go-aah/router/branch/master/graph/badge.svg)](https://codecov.io/gh/go-aah/router/branch/master) [![Go Report Card](https://goreportcard.com/badge/aahframework.org/router.v0)](https://goreportcard.com/report/aahframework.org/router.v0) [![Version](https://img.shields.io/badge/version-0.10-blue.svg)](https://github.com/go-aah/router/releases/latest) [![GoDoc](https://godoc.org/aahframework.org/router.v0?status.svg)](https://godoc.org/aahframework.org/router.v0) [![License](https://img.shields.io/github/license/go-aah/router.svg)](LICENSE) [![Twitter](https://img.shields.io/badge/twitter-@aahframework-55acee.svg)](https://twitter.com/aahframework)

***v0.9 [released](https://github.com/go-aah/router/releases/latest) and tagged on Sep 01, 2017***
***v0.10 [released](https://github.com/go-aah/router/releases/latest) and tagged on Oct 02, 2017***

HTTP Router it supports domain and sub-domains routing. It's built using radix tree routing algorithm of [httprouter](https://github.com/julienschmidt/httprouter) library.

Expand Down
37 changes: 21 additions & 16 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ type (

// Route holds the single route details.
Route struct {
Name string
Path string
Method string
Controller string
Action string
ParentName string
Auth string
MaxBodySize int64
Name string
Path string
Method string
Controller string
Action string
ParentName string
Auth string
MaxBodySize int64
IsAntiCSRFCheck bool

// static route fields in-addition to above
IsStatic bool
Expand Down Expand Up @@ -670,17 +671,21 @@ func parseRoutesSection(cfg *config.Config, routeInfo *parentRouteInfo) (routes
log.Warnf("'%v.max_body_size' value is not a valid size unit, fallback to global limit", routeName)
}

// getting Anti-CSRF check value, GitHub go-aah/aah#115
routeAntiCSRFCheck := cfg.BoolDefault(routeName+".anti_csrf_check", true)

if notToSkip {
for _, m := range strings.Split(routeMethod, ",") {
routes = append(routes, &Route{
Name: routeName,
Path: routePath,
Method: strings.TrimSpace(m),
Controller: routeController,
Action: routeAction,
ParentName: routeInfo.ParentName,
Auth: routeAuth,
MaxBodySize: routeMaxBodySize,
Name: routeName,
Path: routePath,
Method: strings.TrimSpace(m),
Controller: routeController,
Action: routeAction,
ParentName: routeInfo.ParentName,
Auth: routeAuth,
MaxBodySize: routeMaxBodySize,
IsAntiCSRFCheck: routeAntiCSRFCheck,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
package router

// Version no. of aah framework router library
const Version = "0.9"
const Version = "0.10"

0 comments on commit 30fc4da

Please sign in to comment.