Как получить абсолютный путь в Django при использовании nginx?

У меня есть проект django, работающий на nginx и waitress. Вот настройки nginx:

# configuration of the server
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name localhost;
charset utf-8;

# max upload size
client_max_body_size 75M; # adjust to taste

# Django media
location /media {
alias C:/Users/Administrator/Documents/mydjangoproject/media; # your Django project's media files - amend as required
}

location /static {
alias C:/Users/Administrator/Documents/mydjangoproject/static; # your Django project's static files - amend as required
}

# Finally, send all non-media requests to the Django server.
location / {
proxy_pass http://localhost:8080;

}

В моем файле views.py, когда я использую

my_url = request.build_absolute_uri(uri)

Я получаю

http://localhost:8080/

вместо

https://example.com

Как я могу получить абсолютный путь (https://example.com)?

Вернуться на верх