{"id":65839,"library":"gin-contrib-location","title":"Gin Location Middleware","description":"Package location provides a Gin middleware for setting the Location header based on the request URL.","status":"active","version":"1.0.3","language":"go","source_language":null,"source_url":"https://github.com/gin-contrib/location","tags":["gin","middleware","location","url","web"],"install":[{"cmd":"go get github.com/gin-contrib/location","lang":"bash","label":"Install github.com/gin-contrib/location"}],"dependencies":[],"imports":[{"symbol":"location","correct":"github.com/gin-contrib/location"}],"quickstart":{"code":"package main\n\nimport (\n\t\"github.com/gin-contrib/location\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc main() {\n\tr := gin.Default()\n\tr.Use(location.New(location.Config{\n\t\tScheme: \"https\",\n\t\tHost:   \"example.com\",\n\t}))\n\tr.GET(\"/\", func(c *gin.Context) {\n\t\tc.String(200, \"Hello\")\n\t})\n\tr.Run()\n}","lang":"go","description":"Sets up the location middleware with a custom scheme and host."},"warnings":[],"env_vars":null,"search_vec":"'base':15 'gin':1,8,20 'header':14 'locat':2,5,13,22 'middlewar':3,9,21 'packag':4 'provid':6 'request':18 'set':11 'url':19,23 'web':24","created_at":"2026-06-17T17:15:52.675780+00:00","updated_at":"2026-06-17T17:15:52.675780+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/gin-contrib/location","github":"https://github.com/gin-contrib/location","docs":"https://pkg.go.dev/github.com/gin-contrib/location#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}