Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QR-Code missing #8628

Closed
GustelDE opened this issue Oct 27, 2020 · 4 comments
Closed

QR-Code missing #8628

GustelDE opened this issue Oct 27, 2020 · 4 comments

Comments

@GustelDE
Copy link

GustelDE commented Oct 27, 2020

Hi folks,

is it possbile to correct the Image-URL for the QR-Code in the Asset-Window?
The URL points to localhost instead of the correct IP.

Zwischenablage01

The logo on top points to:
http:https://10.10.0.14/uploads/setting-logo-itDQQUwY0h.jpg

The QR-Code points to:
http:https://localhost/hardware/906/qr_code

If I manually edit the URL to the right IP, the QR-Code shows!

Thanks

Snipe-IT: 5.0.4 (but this was since the first time we used Snipe-IT, 4.9.??)
Linux/Docker-Version

EDIT - ADDITIONAL INFORMATION:

If I change in the "view.blade.php"
https://github.com/snipe/snipe-it/blob/master/resources/views/hardware/view.blade.php

In Line 734:
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code"...

to:
<img src="{{ config('url') }}/hardware/{{ $asset->id }}/qr_code"...
The QR-Code show up correctly!

Zwischenablage01

Is it possible to implement this in the next release?
Otherwise I have to do this edit after each update ;D

Reagrds

@PiChG
Copy link

PiChG commented Oct 30, 2020

Hi GustelDE,
we've had simmilar issue with our instance - all images were show properly despite QR codes that had link pointing to 127.0.0.0....
For us solution was to properly setup ENV variables.

Regards,
PiChG

@snipe
Copy link
Owner

snipe commented Nov 13, 2020

You'll want to make sure your APP_URL is correct in your .env file. It should be the full URL of the Snipe-IT instance, including http:https:// or https://.

APP_URL=http:https://10.10.0.14

then clear your config cache.

php artisan config:clear

@snipe snipe closed this as completed Nov 13, 2020
@GustelDE
Copy link
Author

GustelDE commented Nov 13, 2020

Thanks, I knew this, but our Snipe-IT-Server is a multi-homed server, which means he has multiple NICs in different VLANs. A single IP does (by far) not accommodate this problem. I described this here: #8578 (comment)

Four our enviroment I have to comment the "APP_URL" out and edit the view.blade.php as written above.
Or is it possible to add multiple APP_URLs in the .env?

Thanks

@snipe
Copy link
Owner

snipe commented Nov 13, 2020

It's not possible to add multiple IPs - the APP_URL is what's used for the application to know how to generate URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants