我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

使用大猩猩Mux子路由器时如何获取完整的请求路径?

I am using the gorilla toolkit mux to route requests, i have a couple of subroutes using path prefix, problem is i want to get the full request path but req.URL.path only has the part of the url after the path prefix so how do i get a path including the path prefix? thanks in advance

Try req.Referer()

It is retrieved from an header value and you are not guaranteed that it is not spoofed.

近期文章

  • 使用ginkgo / gomega测试Go应用程序时测试文件的正确结构
  • Golang使用接口实现数据库功能
  • OpenGL-一次将所有数据传递到着色器时遇到麻烦
  • 子目录的golang测试失败
  • 如何在SQL扫描功能中传递对结构属性的引用列表以使过程自动化?
  • Golang中的正则表达式命名组无法正确捕获
  • 使用systemd(无限无止境地)转到应用正常启动
  • 在git2go(libgit2)中查找包含指定blob对象的提交
  • 空片返回
  • Go例程中的频道使用情况
  • 带有静态文件的http.HandleFunc
  • Golang JSON解组多个调用
  • 如何在Windows上安装gokogiri?
  • 连接Golang管道和Python 2.7
  • 无法在ioweb2015克隆上提供服务
  • 在Go中国际化日期格式
  • AMQP保证以Go(golang)交付
  • 在goclipse中启用断点
  • 基于Go中错误类型的细粒度错误处理
  • 无法为xml创建结构

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华