aws / aws/serverless-java-container

Provide several Custom Domains and base paths

Abierto
#268 5 comentarios 0 reacciones 0 asignados Ver en GitHub
wontfix
Lenguaje dominante
Java
Estrellas
1.6k
Forks
574
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

* Framework version: 1.3.2
* Implementations: Jersey

I have several different systems running my serverless container:

1. API Gateway + Lambda with Custom Domain Name at `https://api.myproject.com/v1/users/12345`
custom domain: `api.myproject.com`
base path: `v1/users`

2. API Gateway + Lambda with stage path (for testing development releases): https://ixov38idvk.execute-api.us-east-1.amazonaws.com/dev/users/12345
base path: `users`
3. SAM Local at `http://127.0.0.1:3000/users/12345`
base path: `users`

4. Local Tomcat instance for local testing
base path: `users`

So basically the base path changes from the production stage to all other deployments.

Could we then specify several base paths and the one that first matches is the one to be removed?

Also, I tried to return the URI of a created user with:

```java
URI uriLocation = uriInfo.getAbsolutePathBuilder().path(newUserUuid.toString()).build();
return Response.created(uriLocation).build();
```

But since the service base path was stripped, I get an invalid URI instead, such as `https://api.myproject.com/12345`, instead of `https://api.myproject.com/v1/users/12345`

Is it possible to re-inject the stripped path, so we can programatically get the full URI of the original HTTP Request?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Empieza por el manejo de URI de Jersey descrito en torno a uriInfo.getAbsolutePathBuilder() y el comportamiento de eliminación de service base-path. Reproduce después los casos de API Gateway custom-domain, stage-path, SAM Local y Tomcat, y verifica que, cuando hay varios base paths, se utiliza la primera coincidencia y que las URI de los recursos creados conservan la ruta original.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, java
Área
api, backend, cloud
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.