thinkst / canarytokens-docker

Docker configuration to quickly setup your own Canarytokens.
BSD 3-Clause "New" or "Revised" License
598 stars 110 forks source link

[BUG] Nginx incorrect routing to nest paths #178

Open brma2805 opened 1 month ago

brma2805 commented 1 month ago

Describe the bug A problem with nginx routing is causing the routes attended to the frontend to be directed to the backend. The backend returns a 1*1 image, preventing the webpage to be loaded properly, in other words it returns the output of this function render_GET function

To Reproduce Steps to reproduce the behavior:

  1. Spin up the canarytokens as descibred in the docs here https://github.com/thinkst/canarytokens-docker
  2. Run Docker compose up
  3. Try to access the default home page your-hosted-canary[.]domain/
  4. Returns a blank page with no html content.
  5. Open dev tools and look at the network request
  6. CSS and JS files are returned as image/gif type

Expected behavior Expected to load the default canarytoken as seen here https://canarytokens.org/nest/ , but blank page is loaded instead with only the contents from the index.html file

Desktop (please complete the following information):

Solution Running the command below solves the problem. I believe perhaps this image must be rebuildt and updated thinkst/canarytokens_nginx

Thanks for sharing this awesome opensource project 💯

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 14 days with no activity.

jayjb commented 3 weeks ago

Hi @brma2805,

Sorry for the delay in getting back to you. Would you mind sharing your config with us? The different .env files.

The reason I ask is because the canarytokens server will serve different pages for different domains. You will notice with the production server (canarytokens.org); it is canarytokens.org that serves the webpage we interact with, while canarytokens actually use the canarytokens.com domain - if you navigate to that, you will get a different page.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 14 days with no activity.