Juliasunn / video-web

Website for publishing and watching videos, etc...
0 stars 0 forks source link

Serve /private pages via nginx Authentication based on subrequest #15

Closed Juliasunn closed 4 months ago

Juliasunn commented 4 months ago

Make a subrequest to server from nginx to implement authentication and serve page based on authentication subrequest result.

NGINX can authenticate each request with an external server or service. To perform authentication, NGINX makes an HTTP subrequest to an external server where the subrequest is verified. If the subrequest returns a 2xx response code, the access is allowed, if it returns 401or 403, the access is denied.

Article: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/

Nginx regex tests: https://nginx.viraptor.info/