Skip to content

Conversation

@seclution
Copy link
Contributor

@seclution seclution commented Mar 20, 2025

Fix relative URL to work behind a proxy
I suspect the issue lies with the functions frappe.utils.generate_route or get_route. When operating behind a proxy, shortcut URLs that end with a trailing slash (/) are not correctly converted into fully qualified URLs. If the trailing slash is omitted, the URL is properly interpreted as a relative path.
Before:
ksnip_20250408-095259

Change:
ksnip_20250408-095301

After:
ksnip_20250408-095303

Fix relative URL to work behind a proxy
@seclution seclution requested a review from ruchamahabal as a code owner March 20, 2025 12:49
Copy link
Member

@ruchamahabal ruchamahabal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a before after screenshot/gif for showing the problem?

@seclution
Copy link
Contributor Author

I suspect the issue lies with the functions frappe.utils.generate_route or get_route. When operating behind a proxy, shortcut URLs that end with a trailing slash (/) are not correctly converted into fully qualified URLs. If the trailing slash is omitted, the URL is properly interpreted as a relative path.
Before:
ksnip_20250408-095259

Change:
ksnip_20250408-095301

After:
ksnip_20250408-095303

@ruchamahabal ruchamahabal changed the title Update shift_&_attendance.json fix: Roster path in Shift & Attendance workspace Apr 8, 2025
"label": "Roster",
"type": "URL",
"url": "/hr/roster/"
"url": "/hr/roster"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will also have to update modified timestamp for this json document for it to get synced on migrating sites
Also requesting you to move description to the main PR description section from the comment

And for future contributions please follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess thats fine now?

@ruchamahabal ruchamahabal merged commit 1283c62 into frappe:develop Apr 14, 2025
3 of 6 checks passed
mergify bot pushed a commit that referenced this pull request Apr 14, 2025
(cherry picked from commit 1283c62)

# Conflicts:
#	hrms/hr/workspace/shift_&_attendance/shift_&_attendance.json
ruchamahabal added a commit that referenced this pull request Apr 14, 2025
)

* Merge pull request #2887 from seclution/patch-1

(cherry picked from commit 1283c62)

# Conflicts:
#	hrms/hr/workspace/shift_&_attendance/shift_&_attendance.json

* chore: fix conflicts

* chore: fix conflicts

---------

Co-authored-by: Kai Biebel <38378574+seclution@users.noreply.github.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Apr 16, 2025
## [15.43.1](v15.43.0...v15.43.1) (2025-04-16)

### Bug Fixes

* **LA:** Show alert with newly changed value ([c5e7470](c5e7470))
* **leave-application:** Format date string based on user locale ([1bf72d1](1bf72d1))
* **payroll bank entry:** ignore employee with zero payment amount ([564d378](564d378))
* precision error for outstanding amount calculation in expense claim ([5f053e0](5f053e0))
* Roster path in Shift & Attendance workspace (backport [#2887](#2887)) ([#2973](#2973)) ([56c778b](56c778b))
* Set from_date or to_date automatically and show alert ([12b2de0](12b2de0))
@seclution seclution deleted the patch-1 branch April 23, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants