Basically, if I want to monitor the attendance of my employee I go to the attendance app there. All employees are able to just check in and check out. If employee is absent, they still can log in at home and do check in.
How to block employee from accessing the attendance app when not in internal network?
My setup is using dynamic DNS -> reverse proxy, nginx. Can I block this access via nginx ? Currently my nginx configuration file is like this:
#odoo server
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
# http -> https
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com www.example.com;
return 301 https://www.example.com$request_uri;
}
server {
# SSL configuration
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name example.com www.example.com;
if ($http_host = 'example.com')
{
return 301 https://www.example.com$request_uri;
}
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Add Headers for odoo proxy mode
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
#SSL
include snippets/ssl-example.com.conf;
include snippets/ssl-params.conf;
# log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Redirect longpoll requests to odoo longpolling port
location /longpolling {
proxy_pass http://odoochat;
}
# Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_pass http://odoo;
# set headers
# ...
location ~ /web/database/manager {
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://localhost:8069;
# set headers
}
location ~ /web/database/selector {
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://localhost:8069;
# set headers
}
}
# common gzip
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}
What is the best method for my situation? Thanks