Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

302 redirect causes max redirects error #387

Open
cobyforrester opened this issue Sep 26, 2022 · 0 comments
Open

302 redirect causes max redirects error #387

cobyforrester opened this issue Sep 26, 2022 · 0 comments

Comments

@cobyforrester
Copy link

Sorry to spam the repo with issues.

The response that is returned to the proxy is:

< HTTP/1.1 302 FOUND
< Server: Werkzeug/2.2.2 Python/3.10.7
< Date: Mon, 26 Sep 2022 22:33:59 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 669
< Location: $REDURECT_URL
< Vary: Cookie
< Set-Cookie: session=$COOKIE HttpOnly; Path=/
< Connection: close
< 
<!doctype html>
<html lang=en>
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to the target URL: <a href="$REDURECT_URL">$REDURECT_URL</a>. If not, click the link.

However, when proxied through openapi-cop, I get this error Error: Exceeded maxRedirects. Probably stuck in a redirect loop $REDIRECT_URL. With the server outputting this:

(node:8) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 pipe listeners added. Use emitter.setMaxListeners() to increase limit
2022-09-26T22:34:53.451Z openapi-cop:proxy Validation results [GET /api/user/signin] 
{
  "request": {
    "valid": true,
    "errors": null
  }
}
2022-09-26T22:34:53.456Z openapi-cop:proxy Could not send request: Error: Exceeded maxRedirects. Probably stuck in a redirect loop $REDIRECT_URL

This makes the proxy unusable for endpoints that redirect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant