Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64295db0e7 | ||
|
|
6dcd302ab7 | ||
|
|
e50e769e22 | ||
|
|
b7c85e2368 | ||
|
|
a60289fc49 |
@@ -1,4 +1,4 @@
|
||||
POST http://localhost:12000/wahlrecht/v1/calculate
|
||||
POST {{backend}}/wahlrecht/v1/calculate
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
GET {{backend}}/wahlrecht/v1/elections
|
||||
Content-Type: application/json
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"dev": {
|
||||
"backend": "http://localhost:12000"
|
||||
},
|
||||
"prod" : {
|
||||
"backend": "https://api.2martens.de"
|
||||
}
|
||||
}
|
||||
+3
@@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.security.OAuthFlows
|
||||
import io.swagger.v3.oas.annotations.security.SecurityScheme
|
||||
import io.swagger.v3.oas.models.OpenAPI
|
||||
import io.swagger.v3.oas.models.info.Info
|
||||
import io.swagger.v3.oas.models.servers.Server
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
@@ -35,5 +36,7 @@ open class OpenApiConfiguration {
|
||||
.version(apiVersion)
|
||||
.description(apiDescription)
|
||||
)
|
||||
.addServersItem(Server().url("http://localhost:12000"))
|
||||
.addServersItem(Server().url("https://api.2martens.de"))
|
||||
}
|
||||
}
|
||||
|
||||
+6
-3
@@ -16,10 +16,13 @@ open class WebConfiguration(private val headerInterceptorRest: HeaderInterceptor
|
||||
override fun addCorsMappings(registry: CorsRegistry) {
|
||||
val registration = registry.addMapping("/**")
|
||||
registration.allowedMethods(
|
||||
HttpMethod.GET.name(), HttpMethod.POST.name(),
|
||||
HttpMethod.PUT.name(), HttpMethod.OPTIONS.name()
|
||||
HttpMethod.GET.name(), HttpMethod.POST.name(),
|
||||
HttpMethod.PUT.name(), HttpMethod.HEAD.name()
|
||||
)
|
||||
registration.allowCredentials(true)
|
||||
registration.allowedOrigins("http://localhost:4200")
|
||||
registration.allowedOrigins(
|
||||
"http://localhost:4200",
|
||||
"https://wahlrecht.2martens.de"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user