Login

Snippets by jamiecURLe

Snippet List

Preferred Domain decorator function.

From time to time I often have to work with a site that has two domain names. This can be an issue when dealing with mapping api keys so to solve this problem I whipped up a decorator function that allows a preferred domain to be enforced on a per view basis. It wouldn't be too much to take this onto a middleware, but for my usage I just wanted a per view granularity and a decorator function suited my needs quite nicely.

  • decorator
  • domain
  • preferred-domain
Read More

jamiecURLe has posted 1 snippet.