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

http protocol is hardcoded in the URL #40

Closed
DeadNews opened this issue Aug 19, 2024 · 4 comments
Closed

http protocol is hardcoded in the URL #40

DeadNews opened this issue Aug 19, 2024 · 4 comments

Comments

@DeadNews
Copy link

http protocol is hardcoded in the URL

msgURL := fmt.Sprintf("http://%s/message/%s", s.Domain, msg.Key)

How to use https protocol instead of http?

Steps To Reproduce

  1. Open https://safesecret.info and click on «Generate Secure Link».
  2. Get the link: http://safesecret.info/message/{{ UUID }}.
@umputun
Copy link
Owner

umputun commented Aug 19, 2024

@oneils - i think this was a regression introduced by #31

could you pls take a look?

@DeadNews
Copy link
Author

msgURL := fmt.Sprintf("http://%s/message/%s", s.Domain, msg.Key)

Possible solutions are to replace the domain variable with root_url or to add a protocol variable.

Example of grafana config with these variables:

[server]
domain = grafana.example.com
enforce_domain = true
root_url = https://grafana.example.com

@oneils
Copy link
Contributor

oneils commented Aug 19, 2024

@umputun , sure. I'll take it.

oneils added a commit to oneils/secrets that referenced this issue Aug 20, 2024
   - moved hardcoded protocol to an argument
oneils added a commit to oneils/secrets that referenced this issue Sep 15, 2024
oneils added a commit to oneils/secrets that referenced this issue Sep 15, 2024
oneils added a commit to oneils/secrets that referenced this issue Sep 15, 2024
umputun pushed a commit that referenced this issue Sep 15, 2024
oneils added a commit to oneils/secrets that referenced this issue Sep 15, 2024
   - moved hardcoded protocol to an argument
umputun pushed a commit that referenced this issue Sep 16, 2024
   - moved hardcoded protocol to an argument
@umputun
Copy link
Owner

umputun commented Sep 16, 2024

fixed by #41

@umputun umputun closed this as completed Sep 16, 2024
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