Skip to content

Issue in redirect urls #186

@Pallav-552

Description

@Pallav-552

In my django app my base url is --> htps://api.abc.in/api_app/
I have written a rule in urls.py
re_path(r'^grafana(?P.*)', TestProxyView.TestProxyView.as_view()),

as per above rule when I hit htps://api.abc.in/api_app/grafana it redirect via proxy to my proxy server correctly.
my Proxyview implementation:

from revproxy.views import ProxyView
from revproxy.utils import normalize_request_headers


class TestProxyView(ProxyView):
    upstream = 'https://grafana.com'

now when subsequent calls are getting redirect its going to
hhtps://api.abc.in/grafana/abc.js but ideally I want it htps://api.abc.in/api_app/grafana/abc.js

Any help will be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions