Redirect Endpoint
How to use the redirect endpoint
goshs can serve HTTP 3xx redirects via a special URL query parameter. This is useful in penetration testing and CTF scenarios where you want to redirect a victim’s browser or server-side request to an arbitrary target — for example when testing open-redirect vulnerabilities or chaining SSRF attacks.
Triggering a redirect
Append ?redirect to any goshs URL and provide the target via ?url=:
goshs will respond with an HTTP 302 redirect to https://example.com.
Choosing the status code
Use ?status= to select any 3xx response code (301, 302, 303, 307, 308, etc.). Defaults to 302 if omitted.
Adding custom response headers
Zero or more ?header= values can be appended. Each value must be in Name: Value format:
Full example
Error handling
| Condition | HTTP status |
|---|---|
?url= parameter missing |
400 Bad Request |
?status= is not a 3xx code |
400 Bad Request |
Malformed ?header= value (missing : ) |
400 Bad Request |
Notes
- The redirect endpoint is available on the standard HTTP/HTTPS port — no additional flag is needed to enable it.
- Redirect events are logged and emitted as collaboration events (visible in verbose output).
- Authentication and TLS settings apply to the redirect endpoint just as they do to all other goshs routes.