Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

137
Visualizações
GET request with body rejected by GKE

I am running a FastAPI backend service on GKE. There's a legacy endpoint that uses a GET request with body attached to it. I know that GET requests are not supposed to have a body, but this is a legacy endpoint used by a library therefore I have no choice but to support it.

Currently when a GET request with body is send to GKE, I get the following response: enter image description here

I have tested the endpoint locally and it works without issues. I don't know exactly what the issue is but GCP is definitely intercepting the request at some point and rejecting it due to it having a body.

The only workaround I can think of currently is using a some sort of proxy and converting the request before it reaches GKE. Unfortunately, I'm not a GCP expert.

Has anyone had any experience tackling an issue like this? What would be an optimal solution here, granted that the endpoint has to be supported currently?

EDIT: Added ingress config:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: XXX
  namespace: XXX
  annotations:
    ingress.kubernetes.io/ssl-redirect: "false"
    kubernetes.io/ingress.global-static-ip-name: XXX
    #ingress.kubernetes.io/enable-cors: "true"
    
spec:
  tls:
  - hosts:
    - 'XXX'
    secretName: tls-secret
  rules:
  - host: XXX
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: XXX
            port:
              number: 80
      - path: /api
        pathType: Prefix
        backend:
          service:
            name: XXX
            port:
              number: 80
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This is a response from the Google Load Balancer, which is configured the the GKE Ingress resource. I don't think that this can be configured in a way that it accepts that request.

You might try using another Ingress controller that doesn't reject such malformed requests.

See also Google compute load balancer throws 400 Bad Request on DELETE

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda