Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RETARGET] supports subdomain #358

Closed
wants to merge 2 commits into from
Closed

[RETARGET] supports subdomain #358

wants to merge 2 commits into from

Conversation

xiaoao
Copy link

@xiaoao xiaoao commented Oct 24, 2013

I think this isn't a graceful way to support subdomain, and who will be nice enough to give me a better way
thx in advance

@@ -91,7 +92,15 @@ type Router struct {
var notFound = &RouteMatch{Action: "404"}

func (router *Router) Route(req *http.Request) *RouteMatch {
leaf, expansions := router.Tree.Find(treePath(req.Method, req.URL.Path))
// by xiaoao[github.com/xiaoao]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be tagging yourself in the code. It is in the git blame anyway.

@xiaoao
Copy link
Author

xiaoao commented Oct 25, 2013

ok,thank you

@brendensoares
Copy link
Member

@xiaoao you should write some unit tests ti ensure different subdomains are properly recognized (eg: some.domain.co.tld and other.long.sub.domains.com as well as a default for domain.com perhaps)

@brendensoares
Copy link
Member

@xiaoao have you been able to test that these changes work as expected?

@@ -15,6 +15,7 @@ import (

type Route struct {
Method string // e.g. GET
Subdomain string // e.g. subdomain:blog
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this being used once it's set?

@brendensoares
Copy link
Member

@xiaoao how would you define your routes with subdomains?

@brendensoares brendensoares changed the title supports subdomain [RETARGET] supports subdomain Sep 11, 2014
@brendensoares brendensoares modified the milestones: v0.11, v0.12, v0.14 Sep 30, 2014
@brendensoares brendensoares added the priority-should sooner rather than later label Jul 1, 2016
@brendensoares
Copy link
Member

See also: #536

@brendensoares brendensoares modified the milestones: Backlog, v0.14 Jul 1, 2016
@notzippy
Copy link
Collaborator

Closing this one in favor of hosts

@notzippy notzippy closed this Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants