How to edit 403 error message in AWS WAF

0

is there a way to customize the 403 error message that WAF puts out? Right now our clients are seeing:

<html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> </body> </html>

Is there way to edit this? So that clients aren't seeing html tags etc if they receive a 403 error trying to log into our app? The WAF rule that is triggering this is the AWS-AWSManagedRulesBotControlRuleSet...being that it is a managed rule I can't edit the JSON to put out a different output (is this just a console limitation?). And I tried using the custom response bodies section on the rule but it isn't what I need. I just want to change the above out to say something like: "403 Forbidden" but I don't want clients to be seeing <html> <head> etc on the app...like I'm not sure if I can use the terminal to edit this? I attached a picture so you can see what the error message looks like...it just looks really unprofessional imo. example of message on app

demandé il y a un mois251 vues
1 réponse
1
profile pictureAWS
EXPERT
répondu il y a un mois
profile picture
EXPERT
A_J
vérifié il y a un mois
  • So would I need to create a new rule from scratch? Or I could implement this with an AWS managed rule?

  • it you open the first URL Didier sent you will see "You can get started with the Custom Response feature by configuring the action associated with any new or existing WAF rule, or the default action associated with your web ACL." so you can create a new rule or use the exisiting one

  • so if I follow these instructions (as illustrated in this video:https://www.youtube.com/watch?v=Cd9c-y3v4y4) this isn't going to work for me because I can't edit a managed rule for AWS

  • checking through this https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html i believe this is exactly what you need

  • could I zoom you and show you what im talking about?

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions