You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite better advice, when self-hosting the FIDI tool on the same Apache virtual host as Firefly, the HTML Form tag action attribute lacks a trailing slash after the path. I acknowledge that FIDI wasn't intended to be run on the same virtual host, nor in a sub-directory. However, I suspect a trivial number of seconds of analysis from the author could probably enable this ability. I was not able to locate the spot in the code myself, which is why I'm reaching out for help.
Expected behaviour
In an ideal world, the app would be completely agnostic of its own location on the server, both with respect to the host header and the request path. And, it turns out, the app has nearly achieved that goal (yay!).
Debug information
Debug information is likely not relevant to this issue. I can absolutely provide anything you might need, if you let me know what you want to see.
Steps to reproduce
Install a self-hosted instance of Firefly directly on Linux with Apache, following the guidance provided here. The app goes into /var/www/firefly-iii.
Install a self-hosted instance of the Data Importer on the same server, following the guidance provided here. The app goes into /var/www/data-importer.
Configure Apache with a virtual host where the DocumentRoot is /var/www/firefly-iii/public. Add this line to the virtual host: Alias /importer /var/www/data-importer/public.
Point your web browser at the data importer. For example, http://firefly.hh.local/importer/. Be sure to use the trailing slash.
Observe the page successfully loads. Click the 'Import File' button. The page reloads exactly as it was.
Open the bowser's Inspector; click the 'Network' tab. In the web app, click the 'Import File' button again. On the 'Network' tab, you can see that a POST was generated to '/importer'. The response was a 301 to '/importer/'.
In the browser's Inspector, click the 'Inspector' tab. Observe the URL in the form action. Edit the URL so that it includes a trailing slash.
In the web app, click the 'Import File' button again. Observe that it proceeds to the file upload screen.
(Optional) Proceed with file upload, import, and verification. It works!
Additional info
I am happy and willing to submit a pull request to add detection logic for hosting in a sub-directory. But, I am not able to locate the relevant code section. I also attempted to fix this using the .htaccess file, but I did not have success detecting a POST and avoiding the [R] flag.
The text was updated successfully, but these errors were encountered:
JC5
added a commit
to firefly-iii/data-importer
that referenced
this issue
Aug 20, 2022
Yes, that solution works! I also tested for regression using a dedicated domain name, as well as pointing the DocumentRoot to the folder above public (which doesn't have a redirect like Firefly does), and everything appears to work the same as previously or better. Thank you so much!
Support guidelines
I've found a bug and checked that ...
Description
Despite better advice, when self-hosting the FIDI tool on the same Apache virtual host as Firefly, the HTML
Form
tagaction
attribute lacks a trailing slash after the path. I acknowledge that FIDI wasn't intended to be run on the same virtual host, nor in a sub-directory. However, I suspect a trivial number of seconds of analysis from the author could probably enable this ability. I was not able to locate the spot in the code myself, which is why I'm reaching out for help.Expected behaviour
In an ideal world, the app would be completely agnostic of its own location on the server, both with respect to the host header and the request path. And, it turns out, the app has nearly achieved that goal (yay!).
Debug information
Debug information is likely not relevant to this issue. I can absolutely provide anything you might need, if you let me know what you want to see.
Steps to reproduce
/var/www/firefly-iii
./var/www/data-importer
.DocumentRoot
is/var/www/firefly-iii/public
. Add this line to the virtual host:Alias /importer /var/www/data-importer/public
.http://firefly.hh.local/importer/
. Be sure to use the trailing slash.action
. Edit the URL so that it includes a trailing slash.Additional info
I am happy and willing to submit a pull request to add detection logic for hosting in a sub-directory. But, I am not able to locate the relevant code section. I also attempted to fix this using the
.htaccess
file, but I did not have success detecting a POST and avoiding the[R]
flag.The text was updated successfully, but these errors were encountered: