electerious / electerious/Ackee

Make ackee loadable from subfolder/same host

Open
#323 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.7k
Forks
384
PR merge metrics
No merged PRs in 30d

Description

Hi there, i really like ackee for its clear visuals and simplicity. Also i can easily set it up with docker and reverse proxy.

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

If i understand correctly, ackee can only be loaded from a different (sub)domain. For this to work, you need to setup headers etc. Also you need to open another https connection with handshake etc. which can be slowish. This is not a real problem because ackee.js loads asynchronous.

**💡 Describe the solution you'd like**

Configure ackee to be loadable from a subfolder. This is already doable e.g.

- Main site hosted on `example.com`
- ackee-docker reverse proxied on `ackee.example.com`
- configure webserver to internally proxy `example.com/ackee.js` and `example.com/api` to same ackee-docker host as `ackee.example.com`.
- embed script but change source from `ackee.example.com/ackee.js` to `example.com/ackee.js`
- script is loaded and ackee counts visits on different hosts, but no second https connection is opened so site loads faster. Also i did not explicitly set up (cors-)headers for this and it still worked (with [caddy http server](https://caddyserver.com))
- ackee dashboard still reachable under `ackee.example.com`

I'm unsure if this breaks anything, because i couldn't find this setup in the docs. For me it is working.

**📋 Additional context**

This is surely more "nice to have" than a serious issue. Also maybe all of this already is implemented but i did not find it in the docs? Then please dismiss this request.

Greetings!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.