/
githubmirror
/
GoFrame
Обзор
Документация
Войти
/
githubmirror
/
GoFrame
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
net/ghttp/ghttp_server_config_route.go
24 строки
743 B
houseme
improve comment
19 мар 2022, 12:58
19 мар 2022, 12:58
8357b0f
Код
Авторство
О чём код?
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package ghttp // SetRewrite sets rewrites for static URI for server. func (s *Server) SetRewrite(uri string, rewrite string) { s.config.Rewrites[uri] = rewrite } // SetRewriteMap sets the rewritten map for server. func (s *Server) SetRewriteMap(rewrites map[string]string) { for k, v := range rewrites { s.config.Rewrites[k] = v } } // SetRouteOverWrite sets the RouteOverWrite for server. func (s *Server) SetRouteOverWrite(enabled bool) { s.config.RouteOverWrite = enabled }