14 lines
534 B
Plaintext
14 lines
534 B
Plaintext
# Authentication configuration for Nginx
|
|
# This file will be included in the main Nginx configuration
|
|
|
|
# Define the authentication realm
|
|
auth_basic "Weight Tracker";
|
|
|
|
# Path to the .htpasswd file containing user credentials
|
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
|
|
|
# CORS headers
|
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
|
|
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization' always;
|