Use realIP
All checks were successful
Build and Push Docker Image on Tag / Build and Push Docker Image (push) Successful in 15m31s
All checks were successful
Build and Push Docker Image on Tag / Build and Push Docker Image (push) Successful in 15m31s
Code was copied from https://github.com/go-chi/chi/blob/master/middleware/realip.go
This commit is contained in:
@ -277,7 +277,7 @@ func (app *application) createVotesHandleKnownVotersElection(w http.ResponseWrit
|
||||
}
|
||||
|
||||
func (app *application) createVotesHandleUnknownVotersElection(w http.ResponseWriter, r *http.Request, election *models.Election) (string, error) {
|
||||
voterIdentity := r.RemoteAddr
|
||||
voterIdentity := realIP(r)
|
||||
|
||||
voterExists, err := app.voters.Exists(voterIdentity, election.ID)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user