Provide several Custom Domains and base paths

Offen
#268 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
aws, java
Bereich
api, backend, cloud

Rechercherichtung

Beginne mit der Jersey-URI-Behandlung, die im Zusammenhang mit uriInfo.getAbsolutePathBuilder() beschrieben ist, und dem Verhalten beim Entfernen des service base-path. Reproduziere anschließend die Fälle API Gateway custom-domain, stage-path, SAM Local und Tomcat und überprüfe dann, dass bei mehreren base paths der erste Treffer verwendet wird und dass URIs für erstellte Ressourcen den ursprünglichen Pfad beibehalten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

wontfix
  • 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:

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?

Vorherrschende Sprache
Java
Sterne
1.6k
Forks
575
Ø Merge
1 T. 15 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus aws/serverless-java-container

Alle Issues in aws/serverless-java-container

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.