Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-13154

Add uri shortener function

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • None
    • framework

    Description

      This improvement offer the possibility to use a shortener url to call ofbiz when it render a url.

      The origin requirement is to send by email a url to contact OFBiz without any information on technical or functionnal context like JWToken, userLogin, orderId, partyId and so on. OFBiz forward only a short reference that match the actual uri wanted.

      Example :

      • ecommerce/myaccount/order/ORD10034 -> s/tiozerzaze
      • ecommerce/myaccount?token=JWT[more..than..100]axdr&userLoginId=Me@ofbiz.org -> s/epsserlner

      When a request arrive in OFBiz with the pattern

       s/{shortener}
      

      , the request handler forward to matched uri.

      To generate a shortener on freemarker template just use it like it :

         <@ofbizUrl pathShortener="true">${MyBigUriToSecure}</@ofbizUrl>
      

      For email template it's ugly recommand to use webSiteId and fullPath

         <@ofbizUrl webSiteId="MyWebSite" fullPath="true" pathShortener="true">${MyBigUriToSecure}</@ofbizUrl>
      

      With this you can have a url like this : https://mywebsite.mydomain/s/rytedqzdfd

      At this time only *<@ofbizUrl *macro freemarker support it.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            nmalin Nicolas Malin
            nmalin Nicolas Malin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment