thunderbird / thunderbird/appointment

Fix up the nginx config

Open
#103 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement infra
Dominant language
Python
Stars
552
Forks
29
Avg merge
1d 6h
Merged PRs (30d)
23

Description

In the AWS environment we use nginx, with a re-write to smash the frontend and backend routes together. With backend routes being prefixed/namespaced by /api/v1/.

This works if the api urls are formatted perfectly, however (as I found out) if you include a ending slash on your api call it will redirect the request to the frontend (e.g. /api/v1/cool-request/ -> /cool-request/)

This should be a little more forgiving..

The config in question: https://github.com/thundernest/appointment/blob/main/frontend/docker/etc/nginx/conf.d/appointments.conf

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with frontend/docker/etc/nginx/conf.d/appointments.conf and inspect how the rewrite handles API paths with a trailing slash. Reproduce the /api/v1/cool-request/ request in the AWS environment or local nginx setup, then verify that it remains an API request instead of redirecting to the frontend.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, nginx
Domain
api, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.