Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
de:modul:ffit:3-jahr:java:learningunits:lu09:aufgaben:a02 [2025/11/04 01:55] – angelegt apeterde:modul:ffit:3-jahr:java:learningunits:lu09:aufgaben:a02 [2025/11/04 03:15] (aktuell) apeter
Zeile 1: Zeile 1:
 ==== LU09.A02 HTTPS ermöglichen ==== ==== LU09.A02 HTTPS ermöglichen ====
  
-Mit dem Cherry-Pick ''TODO'' ...+Bislang waren die APIs unter http://localhost:8080/api/hello erreichbar. 
 + 
 +Entsprechend können folgende Befehle zum Testen benutzt werden. Diese cURLs können auch bei Postman importiert und da (wiederholt) abgesetzt werden. 
 + 
 +<code bash> 
 +curl -k -X POST "http://localhost:8080/projects" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}' 
 + 
 +curl -k -X POST "http://localhost:8080/login" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}' 
 + 
 +... 
 +</code> 
 + 
 +Zukünftig soll jedoch das Frontend https://alexanderpeter.github.io/ffit-lu08-club-accounting-website/ die API ansprechen können. 
 + 
 +Mit dem Cherry-Pick ''ff10bf8'' erhalten Sie die Klasse ''WebConfig.java'' mit den CORS-Einstellung und einer Weiterleitung von HTTP auf HTTPS. 
 + 
 +Ebenfalls ist ein Keystore mit einem SSL-Key im Commit inbegriffen, welcher benutzt werden kann, um HTTPS zu ermöglichen. 
 + 
 +Folgende Änderungen bzw. Ergänzungen in der ''application.properties''-Datei sind jedoch nötig.
  
 <code application.properties> <code application.properties>
Zeile 14: Zeile 32:
 </code> </code>
  
-http://localhost:8080/api/hello +Danach ist die API sowohl unter http://localhost:8080/api/hello als auch unter https://localhost:8443/api/hello verfügbar.
- +
-https://localhost:8443/api/hello+
  
 +Ebenfalls sind die cURLs mit HTTPS verfügbar.
  
 <code bash> <code bash>
 curl -k -X POST "https://localhost:8443/projects" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}' curl -k -X POST "https://localhost:8443/projects" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}'
-</code> 
  
-<code bash> 
 curl -k -X POST "https://localhost:8443/login" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}' curl -k -X POST "https://localhost:8443/login" -H "Content-Type: application/json" -d '{"project_name":"Hobby_Horsing_Horgen","password":"geheim123"}'
 +
 +...
 </code> </code>
  
 +Und zu guter Letzt kann das Frontend https://alexanderpeter.github.io/ffit-lu08-club-accounting-website/ nun auf Ihre lokale API zugreifen: 
 +Happy Testing!
  
  
  • de/modul/ffit/3-jahr/java/learningunits/lu09/aufgaben/a02.1762217750.txt.gz
  • Zuletzt geändert: 2025/11/04 01:55
  • von apeter