Hide the true URL path with Nginx

0

I want a URL like this:

https://hola.es/api/1/email/verify_email?token=asdf&username=stackoverflow 

Become:

https://hola.es/email/verify_email?token=asdf&username=stackoverflow

Is it possible to do this using Nginx as a proxy?

    
asked by Pablo Cegarra 02.08.2017 в 22:53
source

1 answer

1

The configuration of your Nginx to mask the url would be the following, add the following lines:

# nginx configuration
location /api/email/ {
    alias /email/;
}
    
answered by 02.08.2017 в 23:17