Skip to content

Commit 9ebbe73

Browse files
implement new var for https force
1 parent 4b74115 commit 9ebbe73

File tree

2 files changed

+63
-56
lines changed

2 files changed

+63
-56
lines changed

.env.example

Lines changed: 59 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,97 @@
11
# Application Configuration
22
# Basic settings for your application
3-
APP_NAME=<APP_NAME> # Name of your application
4-
PORT=<PORT> # Port the application will listen on
5-
TITLE=<TITLE> # Title of the API
6-
DESCRIPTION=<DESCRIPTION> # Description of the API
7-
VERSION=<VERSION> # Version of your API
8-
AUTHOR=<AUTHOR> # Author(s) of the API
3+
APP_NAME=<APP_NAME> # Name of your application
4+
PORT=<PORT> # Port the application will listen on
5+
TITLE=<TITLE> # Title of the API
6+
DESCRIPTION=<DESCRIPTION> # Description of the API
7+
VERSION=<VERSION> # Version of your API
8+
AUTHOR=<AUTHOR> # Author(s) of the API
99

1010
# MongoDB Credentials
1111
# Settings for connecting to MongoDB
12-
DATA_CONNECTION_METHOD=<CONNECTION_METHOD> # Connection method (mongodb+srv or mongodb)
13-
DATA_SOURCE_USERNAME=<USERNAME> # MongoDB username
14-
DATA_SOURCE_PASSWORD=<PASSWORD> # MongoDB password
15-
DATA_SOURCE_DOMAIN=<DOMAIN> # MongoDB server domain
16-
DATA_SOURCE_DB=<DATABASE> # Database name
17-
DATA_PARAMS=<CONNECTION_PARAMS> # Additional connection parameters
12+
DATA_CONNECTION_METHOD=<CONNECTION_METHOD> # Connection method (mongodb+srv or mongodb)
13+
DATA_SOURCE_USERNAME=<USERNAME> # MongoDB username
14+
DATA_SOURCE_PASSWORD=<PASSWORD> # MongoDB password
15+
DATA_SOURCE_DOMAIN=<DOMAIN> # MongoDB server domain
16+
DATA_SOURCE_DB=<DATABASE> # Database name
17+
DATA_PARAMS=<CONNECTION_PARAMS> # Additional connection parameters
1818

1919
# Redis Credentials
2020
# Settings for connecting to Redis (used for caching)
21-
CACHE_TYPE=<CACHE_TYPE> # Cache type (redis)
22-
CACHE_HOST=<REDIS_HOST> # Redis host
23-
CACHE_PORT=<REDIS_PORT> # Redis port
24-
CACHE_DB=<REDIS_DB> # Redis database ID (usually 0)
25-
CACHE_USERNAME=<REDIS_USERNAME> # Redis username
26-
CACHE_PASSWORD=<REDIS_PASSWORD> # Redis password
27-
CACHE_TIMEOUT=<CACHE_TIMEOUT> # Timeout for cache operations (in ms)
28-
CACHE_LETTUCE_POOL_MAX_ACTIVE=<MAX_ACTIVE> # Max active connections in Redis pool
29-
CACHE_LETTUCE_POOL_MAX_WAIT=<MAX_WAIT> # Max wait time for Redis connections (in ms)
30-
CACHE_LETTUCE_POOL_MAX_IDLE=<MAX_IDLE> # Max idle connections in Redis pool
31-
CACHE_LETTUCE_POOL_MIN_IDLE=<MIN_IDLE> # Min idle connections in Redis pool
21+
CACHE_TYPE=<CACHE_TYPE> # Cache type (redis)
22+
CACHE_HOST=<REDIS_HOST> # Redis host
23+
CACHE_PORT=<REDIS_PORT> # Redis port
24+
CACHE_DB=<REDIS_DB> # Redis database ID (usually 0)
25+
CACHE_USERNAME=<REDIS_USERNAME> # Redis username
26+
CACHE_PASSWORD=<REDIS_PASSWORD> # Redis password
27+
CACHE_TIMEOUT=<CACHE_TIMEOUT> # Timeout for cache operations (in ms)
28+
CACHE_LETTUCE_POOL_MAX_ACTIVE=<MAX_ACTIVE> # Max active connections in Redis pool
29+
CACHE_LETTUCE_POOL_MAX_WAIT=<MAX_WAIT> # Max wait time for Redis connections (in ms)
30+
CACHE_LETTUCE_POOL_MAX_IDLE=<MAX_IDLE> # Max idle connections in Redis pool
31+
CACHE_LETTUCE_POOL_MIN_IDLE=<MIN_IDLE> # Min idle connections in Redis pool
3232

3333
# Cache Configuration
3434
# Settings for cache behavior
35-
CACHE_TIME_TO_LIVE=<CACHE_TTL> # Time to live for cache items (in ms)
36-
CACHE_NULL_VALUES=<BOOLEAN> # Whether to store null values in cache (true/false)
35+
CACHE_TIME_TO_LIVE=<CACHE_TTL> # Time to live for cache items (in ms)
36+
CACHE_NULL_VALUES=<BOOLEAN> # Whether to store null values in cache (true/false)
3737

3838
# Email Credentials
3939
# Settings for sending emails via SMTP
40-
MAIL_HOST=<SMTP_HOST> # SMTP server (e.g., Gmail)
41-
MAIL_PORT=<SMTP_PORT> # SMTP port (587 for TLS)
42-
MAIL_USERNAME=<SMTP_USERNAME> # SMTP login username
43-
MAIL_PASSWORD=<SMTP_PASSWORD> # SMTP login password
44-
MAIL_PROPERTIES_SMTP_AUTH=<TRUE/FALSE> # Enable SMTP authentication (true/false)
45-
MAIL_PROPERTIES_SMTP_STARTTLS_ENABLE=<TRUE/FALSE> # Enable STARTTLS for secure connection
40+
MAIL_HOST=<SMTP_HOST> # SMTP server (e.g., Gmail)
41+
MAIL_PORT=<SMTP_PORT> # SMTP port (587 for TLS)
42+
MAIL_USERNAME=<SMTP_USERNAME> # SMTP login username
43+
MAIL_PASSWORD=<SMTP_PASSWORD> # SMTP login password
44+
MAIL_PROPERTIES_SMTP_AUTH=<TRUE/FALSE> # Enable SMTP authentication (true/false)
45+
MAIL_PROPERTIES_SMTP_STARTTLS_ENABLE=<TRUE/FALSE> # Enable STARTTLS for secure connection
4646

4747
# JWT Credentials
4848
# Settings for JWT (JSON Web Token) authentication
49-
SECURITY_JWT_SECRET_KEY=<JWT_SECRET_KEY> # Secret key for signing JWT tokens
50-
SECURITY_JWT_EXPIRATION=<JWT_EXPIRATION> # JWT expiration time (in ms)
51-
SECURITY_PUBLIC_ROUTES=<PUBLIC_ROUTES> # Public routes that do not require authentication (e.g., /auth/login)
52-
SECURITY_AES_KEY=<AES_KEY> # AES encryption key for sensitive data
53-
SECURITY_SCHEME_NAME=<NAME_SECURITY_SCHEMA> # Name of the security scheme used in API documentation
49+
SECURITY_JWT_SECRET_KEY=<JWT_SECRET_KEY> # Secret key for signing JWT tokens
50+
SECURITY_JWT_EXPIRATION=<JWT_EXPIRATION> # JWT expiration time (in ms)
51+
SECURITY_PUBLIC_ROUTES=<PUBLIC_ROUTES> # Public routes that do not require authentication (e.g., /auth/login)
52+
SECURITY_AES_KEY=<AES_KEY> # AES encryption key for sensitive data
53+
SECURITY_SCHEME_NAME=<NAME_SECURITY_SCHEMA> # Name of the security scheme used in API documentation
5454

5555
# Rate Limiting Config
5656
# Settings for API rate limiting
57-
RATE_LIMITING_MAX_REQUESTS=<MAX_REQUESTS> # Max requests per client IP within the defined time window
58-
RATE_LIMITING_TIME_WINDOW=<TIME_WINDOW> # Time window in milliseconds (1 minute)
59-
RATE_LIMITING_PUBLIC_ROUTES=<PUBLIC_ROUTES> # Public routes excluded from rate limiting
57+
RATE_LIMITING_MAX_REQUESTS=<MAX_REQUESTS> # Max requests per client IP within the defined time window
58+
RATE_LIMITING_TIME_WINDOW=<TIME_WINDOW> # Time window in milliseconds (1 minute)
59+
RATE_LIMITING_PUBLIC_ROUTES=<PUBLIC_ROUTES> # Public routes excluded from rate limiting
6060

6161
# HTTPS Headers (CORS)
6262
# Settings for Cross-Origin Resource Sharing (CORS)
63-
HEADER_CORS_ALLOWED_ORIGINS=<ALLOWED_ORIGINS> # Allowed origins for CORS (e.g., http://localhost:3000)
63+
HEADER_CORS_ALLOWED_ORIGINS=<ALLOWED_ORIGINS> # Allowed origins for CORS (e.g., http://localhost:3000)
6464

6565
# Tomcat Configuration
6666
# Settings for your Tomcat server
67-
SERVER_TOMCAT_TIMEOUT=<TOMCAT_TIMEOUT> # Timeout for Tomcat server (in ms)
67+
SERVER_TOMCAT_TIMEOUT=<TOMCAT_TIMEOUT> # Timeout for Tomcat server (in ms)
6868

6969
# Swagger / OpenAPI Configuration
7070
# Settings for your OpenAPI Docs
71-
SWAGGER_API_DOCS_ENABLED=<TRUE/FALSE> # Enable or disable API documentation generation
72-
SWAGGER_API_DOCS_PATH=<API_DOCS_PATH> # Path to serve OpenAPI JSON (default: /v3/api-docs)
71+
SWAGGER_API_DOCS_ENABLED=<TRUE/FALSE> # Enable or disable API documentation generation
72+
SWAGGER_API_DOCS_PATH=<API_DOCS_PATH> # Path to serve OpenAPI JSON (default: /v3/api-docs)
7373

7474
# Settings for your ReDoc UI
75-
SWAGGER_REDOC_ENABLED=<TRUE/FALSE> # Enable or disable ReDoc UI
76-
SWAGGER_REDOC_PATH=<REDOC_PATH> # Path to access ReDoc UI (e.g., /redoc)
75+
SWAGGER_REDOC_ENABLED=<TRUE/FALSE> # Enable or disable ReDoc UI
76+
SWAGGER_REDOC_PATH=<REDOC_PATH> # Path to access ReDoc UI (e.g., /redoc)
7777

7878
# Settings for your Scalar UI
79-
SCALAR_ENABLED=<TRUE/FALSE> # Enable or disable Scalar UI
80-
SCALAR_PATH=<SCALAR_PATH> # Path to access Scalar UI (e.g., /scalar)
79+
SCALAR_ENABLED=<TRUE/FALSE> # Enable or disable Scalar UI
80+
SCALAR_PATH=<SCALAR_PATH> # Path to access Scalar UI (e.g., /scalar)
8181

8282
# Settings for your Swagger UI
83-
SWAGGER_UI_ENABLED=<TRUE/FALSE> # Enable or disable Swagger UI
84-
SWAGGER_UI_PATH=<SWAGGER_UI_PATH> # Swagger UI access path (e.g., /)
85-
SWAGGER_UI_URL=<SWAGGER_UI_URL> # URL of the OpenAPI docs (default: /v3/api-docs)
86-
SWAGGER_UI_DEFAULT_MODEL_EXPAND_DEPTH=<DEPTH> # Model expand depth (e.g., 1)
87-
SWAGGER_UI_DEFAULT_MODEL_RENDERING=<RENDERING> # Rendering type: example/model
88-
SWAGGER_UI_DISPLAY_OPERATION_ID=<TRUE/FALSE> # Show operation IDs
89-
SWAGGER_UI_DISPLAY_REQUEST_DURATION=<TRUE/FALSE> # Show request duration
90-
SWAGGER_UI_DOC_EXPANSION=<MODE> # Expansion mode: list/full/none
83+
SWAGGER_UI_ENABLED=<TRUE/FALSE> # Enable or disable Swagger UI
84+
SWAGGER_UI_PATH=<SWAGGER_UI_PATH> # Swagger UI access path (e.g., /)
85+
SWAGGER_UI_URL=<SWAGGER_UI_URL> # URL of the OpenAPI docs (default: /v3/api-docs)
86+
SWAGGER_UI_DEFAULT_MODEL_EXPAND_DEPTH=<DEPTH> # Model expand depth (e.g., 1)
87+
SWAGGER_UI_DEFAULT_MODEL_RENDERING=<RENDERING> # Rendering type: example/model
88+
SWAGGER_UI_DISPLAY_OPERATION_ID=<TRUE/FALSE> # Show operation IDs
89+
SWAGGER_UI_DISPLAY_REQUEST_DURATION=<TRUE/FALSE> # Show request duration
90+
SWAGGER_UI_DOC_EXPANSION=<MODE> # Expansion mode: list/full/none
91+
92+
# OpenAPI Server URL
93+
OPENAPI_SERVER_URL=<API_SERVER_URL> # URL of the API server (e.g., https://api.example.com)>
9194

9295
# Log Level Configuration
9396
# Define the logging level (e.g., INFO, DEBUG, OFF)
94-
DEBUGGER_MODE=<DEBUG_MODE> # Log level: INFO, DEBUG, or OFF
97+
DEBUGGER_MODE=<DEBUG_MODE> # Log level: INFO, DEBUG, or OFF

src/main/resources/application.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,7 @@ springdoc:
153153
path: ${SWAGGER_UI_PATH:/}
154154
# URL del JSON de OpenAPI (por defecto /v3/api-docs)
155155
url: ${SWAGGER_UI_URL:/v3/api-docs}
156+
157+
openapi:
158+
servers:
159+
- url: ${OPENAPI_SERVER_URL:http://localhost:8091}

0 commit comments

Comments
 (0)