Skip to main content
Closed

A clear way to find your URL in T-SQL scripts.

  • August 16, 2024
  • 3 replies
  • 58 views

I had the problem that the preview component strips all javascript / css when displaying html from inside the application.

Creating a good “stripper” to protect against code in data entries in T-SQL is almost impossible, so I created a “proxy.html” page with javascript to do this job, and to allow for code I want to inject. ( The first <head> tag goes trough, anything in the body tag is stripped. )

There is one small problem and that is that I can’t tell the script where the API is. It is not possible to generate a correct URL which will work in both test and production.

At this moment I have to make 2 api calls, and compare to our application and branch name, and that is an unstable solution, as the call’s I use could change in future versions.

It would be good to know “who am I, whether I’m running over the SF or IAM, what my application Id is, and how is the user calling me” within the T-SQL scripts.

In other environments you have this information; not having the information is a huge limitation. 

Another use case would be to set up a table to track which browsers people use … In this context it is not possible.

 



 

Did this topic help you find an answer to your question?

3 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3959 replies
  • September 16, 2024

Hi Daan,

What is exactly missing? We do have several session variables you can use, do those suffice or would you like more information?


Forum|alt.badge.img+5
  • Author
  • Sidekick
  • 80 replies
  • September 16, 2024

No, thank you,

The only thing I was missing was a reference to this page; it can be difficult to find a detail like this.


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3959 replies
  • September 17, 2024
NewClosed

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings