snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

[Feature Request]: Customized URL in only Barcode

Open jeonghanlee opened this issue 2 years ago • 7 comments

Is your feature request related to a problem? Please describe.

We are using the Cloud-based Snipe-it solution. Everything works as expected. We are happy. However, we want to add a different and customized URL in the bar code (only for QR). The current default URL is used for the QR code URL, but we want to replace it with our customized URL in case we move the service to a new URL or others; we don't want to generate several thousand QR Codes which we will generate. And the document https://snipe-it.readme.io/docs/barcodes#changing-your-url doesn't seem valid if we use the cloud service from the company.

In the Global setting, Barcodes configuration only allows us to select the following things.

  • Display Sqare Codes
  • 2D Barcode Type
  • Display 1D barcode
  • 1D barcod Type
  • QR Code Text
  • Purge Barcodes

Describe the solution you'd like

We want to have a local or customized URL only for the barcodes as an option such as

  • Display Sqare Codes
  • 2D Barcode Type
  • Display 1D barcode
  • 1D barcod Type
  • QR Code Text
  • Purge Barcodes
  • Customzied URL

In this case, even if we don't have any access to configuration files such as https://snipe-it.readme.io/docs/barcodes#changing-your-url we can customize the label (only QR or maybe DM) information through a web inteface.

Describe alternatives you've considered

No response

Additional context

No response

jeonghanlee avatar Aug 11 '22 01:08 jeonghanlee

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

welcome[bot] avatar Aug 11 '22 01:08 welcome[bot]

Hi @jeonghanlee - I answered you via the helpdesk :)

TLDR for those curious, on the hosted platform, the way to get what you want here is to set up a custom subdomain on your own organization's domain (example, https://assets.example.org and then we can set up a custom subdomain override which will redirect traffic from https://example.snipe-it.io over to your custom subdomain DNS. This is easily done via a support request.

snipe avatar Aug 11 '22 01:08 snipe

The primary motivation is I don't want to generate several thousand labels several years later if we change the URL in different ways.

Yes, this is the same answer I have from customer service. It requires more effort for me to check all security policies. I am looking for feasible solutions to follow customer service.

But to allow users to add customized URLs to QR codes is independent of an actual service URL. That gives users more freedom than the current option because it shows clearly what we have in the QR code or DM code (I didn't check it).

jeonghanlee avatar Aug 11 '22 01:08 jeonghanlee

It looks like snipe-it isn't interested in this issue, so I close it.

jeonghanlee avatar Aug 11 '22 01:08 jeonghanlee

It's not that we're not interested - just trying to solve for the immediate issue :) If it's always pointing at your own CNAME domain, you can always (for example) set up your own .htaccess rules (or Nginx rules, or IIS rules) to be able to handle URL changes that might not be standard.

snipe avatar Aug 11 '22 02:08 snipe

Yes. I see. Every user has its own way even if this is a bit awkward way. Technically I can generate a label with different formats where meets my requirements through API. It could be easy solution for me without the embedded solution with limited options.

I closed this, because I don't like to create undefined issues stay forever.

I hope someone in future may have the same or similar demand which I had.

Thanks for your quick response. I loved it.

jeonghanlee avatar Aug 11 '22 03:08 jeonghanlee

Just commenting that this would also be very helpful to our usecase. We would like to have the QR Codes Pointing to a self hosted domain, so that we can run the checkout there. We can of course build something through forwarding rules, but if we could just set a BaseURL for the Bar Code that would of course be more comfortable.

eviscares avatar Mar 05 '24 10:03 eviscares

My solution was to first change the URL type from "/hardware/id" to "/ht/asset_tag". "/ht/asset_tag" by default is redirected to "/hardware/id". The use mod_rewrite in Apache to redirect all "/ht/asset_tag" links to your custom url.

adhyuthn avatar May 28 '24 21:05 adhyuthn