-
Notifications
You must be signed in to change notification settings - Fork 203
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
Handle termination HTTP signal #78
Conversation
Provide a method of remotely terminating the proxy. See Issue abutaha#77
Probably don't want to add the ability to remotely shutdown the proxy to be accessible unless desired and in a safe environment, so moving behind a flag. Also updated the README with latest usage. See Issue abutaha#77
33f25d5
to
0735035
Compare
Hi, Cool feature! Will have it merged soon. Thanks, |
Thanks! |
@@ -24,4 +24,5 @@ https://github.com/diranged | |||
https://github.com/em0ney | |||
https://github.com/zqben402 | |||
https://github.com/dlackty | |||
https://github.com/amcintosh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😻
@@ -210,6 +212,10 @@ func (p *proxy) getSigner() *v4.Signer { | |||
} | |||
|
|||
func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
if p.remoteTerminate && r.URL.Path == "/terminate-proxy" && r.Method == http.MethodPost { | |||
logrus.Infoln("Terminate Signal") | |||
os.Exit(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! ❤️
@@ -210,6 +212,10 @@ func (p *proxy) getSigner() *v4.Signer { | |||
} | |||
|
|||
func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
if p.remoteTerminate && r.URL.Path == "/terminate-proxy" && r.Method == http.MethodPost { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you land on using POST
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to terminate on a GET and while I considered DELETE, this isn't exactly restful, so I figured POST to be the most intuitive.
Hi @abutaha. Do you know when you'll be able to merge this? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would like this change merged. @amcintosh do you have a docker hub fork of this built?
@phntom I do not at the moment. |
Apologies for the delay. I'll merge this ASAP.
…On Tue, Oct 6, 2020, 20:22 Andrew McIntosh ***@***.***> wrote:
@phntom <https://github.com/phntom> I do not at the moment.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#78 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADJD57X6P54PTGDZMFKNE3SJM76FANCNFSM4PQXLLAQ>
.
|
i've deployed your branch under phntom/aws-es-proxy:0.9.1 but i'll switch when an official release is available, seems to be working well with python requests.post to the url. |
@abutaha Any chance you get this released? |
Provide a method of remotely terminating the proxy.
See Issue #77