RewriteSchemes rewrites the scheme of the provided URLs if they match a rewrite rule.
(rewrites map[string]string, baseURLs ...string)
| 135 | |
| 136 | // RewriteSchemes rewrites the scheme of the provided URLs if they match a rewrite rule. |
| 137 | func RewriteSchemes(rewrites map[string]string, baseURLs ...string) []string { |
| 138 | urls := make([]string, 0, 2*len(baseURLs)) |
| 139 | for _, baseURL := range baseURLs { |
| 140 | urls = append(urls, RewriteScheme(rewrites, baseURL)...) |
| 141 | } |
| 142 | return urls |
| 143 | } |
| 144 | |
| 145 | // WebsocketSchemeRewrites contains the rewrite rules for websocket schemes. |
| 146 | var WebsocketSchemeRewrites = map[string]string{ |