Skip to content

Custom location #1837

Closed Answered by webysther
webysther asked this question in Help wanted
Discussion options

You must be logged in to vote

I got this work with this solution:

location / {
  proxy_pass http://shlink-api:8080/;
}

location /admin/ {
  proxy_pass http://shlink:80/;
  sub_filter_types "*";
  sub_filter_once off;
  # html
  sub_filter 'href="/' 'href="/admin/';
  sub_filter 'content="/' 'content="/admin/';
  sub_filter 'src="/' 'src="/admin/';
  # assets
  sub_filter 'homepage:XY' 'homepage:"/admin"';
  # manifest
  sub_filter '"start_url":"/"' '"start_url":"/admin/"';
  sub_filter '"scope":"/"' '"scope":"/admin/"';
}

With this I don't need to build the client again to got work

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by webysther
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants