passcore icon indicating copy to clipboard operation
passcore copied to clipboard

Ability to set relative path, SSL hostname, etc.

Open ronnessim opened this issue 4 years ago • 7 comments

In our installation, we want to run the application on a specific URL as a subfolder. For example, I might have the intended URL as https://www.myapp.com/password/ which contains the domain name that matches my SSL certificates as well as the intended virtual directory that is mapped to the app.

Right now there is no way to set the hostname of the SSL redirection to ensure it matches the certificate. We are forced to do the redirection and SSL offload in an upstream proxy. The sub-folder poses a challenge because I want the app to load its JS files, images, etc. with https://www.myapp.com/password/ as the base URL. Right now it tries to load resources using absolute paths, and that causes a problem. It would also be nice if the application supported things like X-Forwarded-Proto and X-Forwarded-For. Then it's possible for the app to know if SSL was offloaded upstream.

Consider 2 possible solutions:

  1. Use relative paths in the HTML so that it can be mounted in a subfolder
  2. Allow the baseURL to be specified inside the appsettings.json under the "WebSettings" object.

So far we've made some quick and dirty changes to the code to make the app work in a subfolder. We are using docker/linux to make it run, and we are binding the container to the subfolder where we want the password change to appear in our project. Of course, it would be nice if this was properly parametrized.

ronnessim avatar Feb 10 '21 21:02 ronnessim

@ronnessim Hello! I have some offtopic questions: have you working instance of passcore? What kind of installation is it? Version?

sergiochoo avatar Feb 16 '21 12:02 sergiochoo

@ronnessim I'm successfully using https://caddyserver.com/ for my Linux-based install, but not doing any subfolder stuff right now. It automatically handles Let's Encrypt for HTTPS if you give it a subdomain; also, I do believe there are some modules to try doing the kind of redirecting you do want.

unquietwiki avatar Mar 26 '21 17:03 unquietwiki

I would also love to see support for subfolder / baseUri.

_Note also, that the documentation at https://unosquare.github.io/passcore seems to be valid for v3.x only (there is no base href="/" in index.html for version 4.x).

profix898 avatar Jun 01 '21 21:06 profix898

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 22 '21 18:08 stale[bot]

stale: I guess this is still to fix...

simonai1254 avatar Aug 24 '21 13:08 simonai1254

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 17:04 stale[bot]

Keepalive

simonai1254 avatar Apr 19 '22 14:04 simonai1254