Custom location #1837
-
There's a way to create a custom location for the client? I want to do this configuration on my homelab without the need to burn another domain: https://url.example.com -> backend/api I tried using proxy pass but the client don't seems not respect the current custom location, I added the assets of client too but no luck... |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I would suggest using a subdomain, because it's just easier to manage. https://url.example.com -> backend/api That said, if there's still some reason for you to use a sub path, this might be helpful shlinkio/shlink-web-client#793. It's not exactly the same, but could give you some ideas. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Maybe add to documentation, will be great because with this the security restriction to /s can be done easy. |
Beta Was this translation helpful? Give feedback.
I got this work with this solution:
With this I don't need to build the client again to got work