asciidoctor / asciidoctor-kroki

Asciidoctor.js extension to convert diagrams to images using Kroki!
https://kroki.io/
MIT License
149 stars 50 forks source link

Set application name as referrer to make it easier to troubleshoot issues #241

Closed ggrossetie closed 2 years ago

ggrossetie commented 3 years ago

I think we should set the application name as referrer (HTTP header). Since referrer expects a URL, we could use asciidoctor/kroki.<ext>/<version> for instance: asciidoctor/kroki.js/0.12.0 and asciidoctor/kroki.rb/0.4.0.

We should also make it extensible to add additional information. For instance, when the extension is used in GitLab, we could also add the version of GitLab:

asciidoctor/kroki.rb/0.4.0?gitlab=13.10.2

Similarly, we could add the version of Antora (if available):

asciidoctor/kroki.js/0.12.0?antora=2.3.0

Alternatively, we could use a query strings:

?appName=antora&appVersion=2.3.0
?app=antora+2.3.0
ggrossetie commented 2 years ago

Done.

We should also make it extensible to add additional information. For instance, when the extension is used in GitLab, we could also add the version of GitLab (...)

I didn't implement this feature as we don't need it for now.