Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 gateway rm app switcher #204

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions refarch-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ Beside the default behaviour there are some special route prefixes which are han

## Configuration

| Var | Description | Example |
|-----------------------------------------------------------|----------------------------------------------------|-------------------------------------------------------------------------|
| `SPRING_PROFILES_ACTIVE` | See profiles | `local,hazelcast-local` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_ID` | Id of a route definition. | `backend` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_URI` | The uri to route to if this route matches. | `http://backend-service:8080/` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_PREDICATES_<index>` | Route predicates i.e. matcher. | `Path=/api/backend-service/**` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_FILTERS_<index>` | List of filters applied to the route. | `RewritePath=/api/backend-service/(?<urlsegments>.*), /$\{urlsegments}` |
| `ALLOWED_ORIGINS_PUBLIC` (optional) | List of urls allowed as origin for public routes. | `https://*.example.com,http://localhost:*` |
| `ALLOWED_ORIGINS_CLIENTS` (optional) | List of urls allowed as origin for clients routes. | `https://*.example.com,http://localhost:*` |
| `REFARCH_SECURITY_CSRFWHITELISTED_<index>` (optional) | List of routes to disable csrf protection for. | `/example/**` |
| `INFO_APPSWITCHER_URL` (optional) | App switcher url for usage in refarch frontend. | `https://appswitcher.muenchen.de` |
| Var | Description | Example |
|----------------------------------------------------------|----------------------------------------------------|-------------------------------------------------------------------------|
| `SPRING_PROFILES_ACTIVE` | See profiles | `local,hazelcast-local` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_ID` | Id of a route definition. | `backend` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_URI` | The uri to route to if this route matches. | `http://backend-service:8080/` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_PREDICATES_<index>` | Route predicates i.e. matcher. | `Path=/api/backend-service/**` |
| `SPRING_CLOUD_GATEWAY_ROUTES_<index>_FILTERS_<index>` | List of filters applied to the route. | `RewritePath=/api/backend-service/(?<urlsegments>.*), /$\{urlsegments}` |
| `ALLOWED_ORIGINS_PUBLIC` (optional) | List of urls allowed as origin for public routes. | `https://*.example.com,http://localhost:*` |
| `ALLOWED_ORIGINS_CLIENTS` (optional) | List of urls allowed as origin for clients routes. | `https://*.example.com,http://localhost:*` |
| `REFARCH_SECURITY_CSRFWHITELISTED_<index>` (optional) | List of routes to disable csrf protection for. | `/example/**` |

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ class ActuatorInfoEndpointTest {
private WebTestClient webTestClient;

@Test
void actuatorInfoProvidesAppswitcherUrl() {
void actuatorInfo() {
webTestClient.get().uri("/actuator/info").exchange()
.expectStatus().isOk()
.expectBody()
.jsonPath("$.appswitcher.url").isEqualTo("https://test-url-appswitcher.muenchen.de");
.expectStatus().isOk();
}

}
2 changes: 0 additions & 2 deletions refarch-gateway/src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,3 @@ spring:
keycloak:
client-id: refarch-gateway
client-secret:

info.appswitcher.url: https://test-url-appswitcher.muenchen.de