-
Notifications
You must be signed in to change notification settings - Fork 0
/
gateway-server.yml
65 lines (62 loc) · 1.74 KB
/
gateway-server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
eureka:
client:
serviceUrl:
defaultZone: http://eureka:password@localhost:9102/eureka/
logging:
level:
org:
springframework:
security: DEBUG
spring:
cloud:
gateway:
globalcors:
corsConfigurations:
'[/**]':
allowedOrigins: "http://localhost:5173"
allowedHeaders: "*"
allowedMethods:
- GET
- POST
- PUT
# Use PKCE auth flow
default-filters:
- TokenRelay=
routes:
- id: product-service
uri: lb://product-service
predicates:
- Path=/api/v1/products/**
- Method=GET
- id: starship-service
uri: lb://starship-service
predicates:
- Path=/api/v1/starships/**
- Method=GET
- id: inventory-service
uri: lb://inventory-service
predicates:
- Path=/api/v1/inventory/{skuCode}
- Method=GET
# Comment following this https://www.youtube.com/watch?v=hfeOqvHxHO8&list=PLab_if3UBk99jYV1jfe_7fKQczVX9H4zZ&index=11
# to use PKCE Authorization code flow
# refer to https://www.youtube.com/watch?v=YHWfJHKGYGI&list=PLab_if3UBk99jYV1jfe_7fKQczVX9H4zZ&index=11
security:
oauth2:
client:
registration:
gateway:
provider: gateway
client-id: backend_client
client-secret: l0x9ajixZUksbanezzaaAALR9cIxm486
authorization-grant-type: authorization_code
redirect-uri: '{baseUrl}/login/oauth2/code/{registrationId}'
scope: openid
provider:
gateway:
issuer-uri: http://localhost:8181/realms/starshipshop-realm
sleuth:
sampler:
probability: 1.0
zipkin:
base-url: http://localhost:9411