Jhipster API Gateway request is getting 405 (Method Not Allowed)

Discussão em 'Angular' iniciado por manchitro, Novembro 3, 2024.

  1. manchitro

    manchitro Guest

    Using jhipster-generate, I have created a gateway application which acts as an Angular frontend running on localhost:8090 and I have a microservice application already running with endpoints setup on localhost:8082.

    I have setup application.yml configurations of Spring Cloud Gateway:

    spring:
    cloud:
    gateway:
    routes:
    - id: service
    uri: http://localhost:8082
    predicates:
    - Path=/service/**
    filters:
    - RewritePath=/service/(?<segment>.*), /${segment}


    and of Jhipster API Gateway:

    jhipster:
    gateway:
    authorized-microservices-endpoints:
    service: /service/**


    Then I am sending a POST request from the frontend to the URL: http://localhost:8090/service/api/get-permission but getting 405 Method Not Allowed everytime. I tried sending a GET request to the same URL, I get 200 OK but the request is not routed to localhost:8082 but returns the main HTML file of the Angular application. How can I troubleshoot this gateway mechanism?

    N.b: I am not using any service discovery such as Eureka or Consul

    Continue reading...

Compartilhe esta Página