Score:0

I want to set the status code of a specific path to "404" GCP Load Balancer

id flag
KSH

I have a HTTPS Load Balancer in GCP and I want to set the status code of a specific path to "404", I have this path https://my-domain/health/monitor

This path is used for the healthcheck, however it is a screen that I don't want to be accessed from the outside

Could you please tell me if there is a way to set the status code of a specific path (health/*) to 404 in GCP Load Balancers

Best regards

Score:2
tv flag

At the moment we cannot set a custom 404 error in the GCP LB configuration, however, currently there is a Feature Request to add this functionality. As a workaround, I suggest you try to create your custom error pages (eg. apache or nginx) and set the URL redirect on your HTTP(S) Load Balancer -> Host and path rules configuration

id flag
KSH
thank you for have a look, I'll try your suggestion
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.