How to retrieve the hostname from the current URI, server side?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 03:29 AM
Is there any way I can retrieve the hostname from the current user's session, server side?
I am completely aware of the system property "glide.servlet.uri" - This Will Not Work.
I cannot use any system propery.
Glide System (gs.getSession().getUrlOnStack()) does not provide the hostname.
The reason I am asking is because I am trying to dynamically assign a redirect URL in the "MultiSSO_OIDC_internal" script include to accomodate for users logging in from a Custom URL and/or the standard instance url.
- Labels:
-
Service Desk
- 1,676 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 04:04 AM
There is a property called instance_name
You can use that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2022 04:18 AM
No, that will not work. I cannot use a system property.
You did not read my question, I need to get the hostname from the users session for use in the SSO script includes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 12:02 AM
Hello Lewis,
Did you manage to find a solution around this? I am having a similar situation but with the SPEntryPage script include. Will be appreciated if you can share some ideas on this.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2022 05:33 AM
Hello Kristian,
I did not find a way to get the Client's URL, Server side, for my specific circumstance.
Your situation sounds similar to mine, in that you need to pass some client data to the server script.
I solved my requirement for applying a unique redirect URL for SSO by using multiple SSO Identity Providers.
I used a client script to read to Hostname and using some logic, applied a unique SSO identity sys_id to the hyperlink for logging via SSO.
Perhaps you could tweak the SPEntryPage script include with an extension point and somehow pass client data into the script includes.