forked from Hithomelabs/CFTunnels
Compare commits
10 Commits
b804cc978f
...
a1275ec06c
| Author | SHA1 | Date | |
|---|---|---|---|
| a1275ec06c | |||
| 6794e56748 | |||
| 25ef5660fa | |||
| 0d576eb9a7 | |||
| f99ed01a54 | |||
| 18e3535a57 | |||
| 4d63eb2e2c | |||
| e9e6bd69f9 | |||
| c8e8817e25 | |||
| 057d0120b7 |
@ -19,13 +19,13 @@ services:
|
||||
restart: unless-stopped
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: cftunnel-db
|
||||
container_name: cftunnel-db-${ENV}
|
||||
environment:
|
||||
POSTGRES_DB: cftunnel
|
||||
POSTGRES_USER: ${POSTGRES_USERNAME}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "${DB_PORT}:5432"
|
||||
volumes:
|
||||
- ${DB_PATH}:/var/lib/postgresql/data
|
||||
@ -11,12 +11,12 @@ import java.util.ArrayList;
|
||||
@Configuration
|
||||
public class OpenApiConfig {
|
||||
|
||||
@Value("${api.corsResolveUrl}")
|
||||
private String corsResolveUrl;
|
||||
@Value("${api.baseUrl}")
|
||||
private String baseUrl;
|
||||
|
||||
@Bean
|
||||
public OpenAPI openAPI(){
|
||||
Server httpsServer = new Server().url(corsResolveUrl);
|
||||
Server httpsServer = new Server().url(baseUrl);
|
||||
OpenAPI openApi = new OpenAPI();
|
||||
ArrayList<Server> servers = new ArrayList<>();
|
||||
servers.add(httpsServer);
|
||||
|
||||
@ -29,8 +29,9 @@ public class SecuirtyConfig {
|
||||
http
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
.anyRequest().authenticated()
|
||||
)
|
||||
.with(new OAuth2LoginConfigurer<>(), oauth2 -> oauth2.userInfoEndpoint(u -> u.oidcUserService(customOidcUserConfiguration)));
|
||||
).csrf(csrf -> csrf.disable())
|
||||
.with(new OAuth2LoginConfigurer<>(),
|
||||
oauth2 -> oauth2.userInfoEndpoint(u -> u.oidcUserService(customOidcUserConfiguration)));
|
||||
|
||||
|
||||
return http.build();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
api.corsResolveUrl=http://localhost:8080
|
||||
api.baseUrl=http://localhost:8080
|
||||
|
||||
management.health.db.enabled=true
|
||||
management.endpoints.web.exposure.include=health
|
||||
|
||||
@ -1 +1 @@
|
||||
api.corsResolveUrl=https://cftunnels.hithomelabs.com
|
||||
api.baseUrl=https://cftunnels.hithomelabs.com
|
||||
@ -1 +1 @@
|
||||
api.corsResolveUrl=https://testcf.hithomelabs.com
|
||||
api.baseUrl=https://testcf.hithomelabs.com
|
||||
@ -4,6 +4,12 @@ cloudflare.apiKey=${CLOUDFLARE_API_KEY}
|
||||
cloudflare.email=${CLOUDFLARE_EMAIL}
|
||||
spring.profiles.active=${ENV}
|
||||
|
||||
# set root level
|
||||
logging.level.root=INFO
|
||||
# package-specific
|
||||
logging.level.org.springframework=TRACE
|
||||
logging.level.com.myapp=INFO
|
||||
|
||||
/ * * Masking sure app works behind a reverse proxy
|
||||
server.forward-headers-strategy=framework
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user