Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Ability to set relative path, SSL hostname, etc. #619

Open
ronnessim opened this issue Feb 10, 2021 · 7 comments
Open

Ability to set relative path, SSL hostname, etc. #619

ronnessim opened this issue Feb 10, 2021 · 7 comments

Comments

@ronnessim
Copy link

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.

@sergiochoo
Copy link

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

@unquietwiki
Copy link
Collaborator

@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.

@profix898
Copy link

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).

@stale
Copy link

stale bot commented Aug 22, 2021

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 stale bot added the wontfix Problem, or not; this won't be fixed here at least. label Aug 22, 2021
@simonai1254
Copy link

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

@stale stale bot removed the wontfix Problem, or not; this won't be fixed here at least. label Aug 24, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

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 stale bot added the wontfix Problem, or not; this won't be fixed here at least. label Apr 16, 2022
@simonai1254
Copy link

Keepalive

@stale stale bot removed the wontfix Problem, or not; this won't be fixed here at least. label Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants