(c *gin.Context, proxyCtx ProxyContext)
| 318 | } |
| 319 | |
| 320 | func (controller *ProxyController) handleError(c *gin.Context, proxyCtx ProxyContext) { |
| 321 | redirectURL := fmt.Sprintf("%s/error", controller.config.AppURL) |
| 322 | |
| 323 | if !controller.useBrowserResponse(proxyCtx) { |
| 324 | c.Header("x-tinyauth-location", redirectURL) |
| 325 | c.JSON(500, gin.H{ |
| 326 | "status": 500, |
| 327 | "message": "Internal Server Error", |
| 328 | }) |
| 329 | return |
| 330 | } |
| 331 | |
| 332 | c.Redirect(http.StatusTemporaryRedirect, redirectURL) |
| 333 | } |
| 334 | |
| 335 | func (controller *ProxyController) getHeader(c *gin.Context, header string) (string, bool) { |
| 336 | val := c.Request.Header.Get(header) |
no test coverage detected