Skip to content

🐛(nginx) fix 404 when accessing a doc #866

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Apr 10, 2025

Purpose

We improve the nginx way to access to a specific doc, to not have a 404 before accessing the resource.

Proposal

We stop to wait for a initial attempt that give a 404.
If we see a UUID in the url we will redirect to the doc/[id] page.
Next will then manage the 404.

Easy way to test

  • go to src/frontend/apps/impress
  • yarn build
  • Access the app from nginx, in docker-compose.yml, add this service:
  nginx-ci:
    image: nginx:1.25
    ports:
      - "3000:3000"
    volumes:
      - ./src/frontend/apps/impress/conf/default.conf:/etc/nginx/conf.d/default.conf
      - ./src/frontend/apps/impress/out:/usr/share/nginx/html
    depends_on:
      - app-dev
      - keycloak
  • go to http://localhost:3000

@AntoLC AntoLC added the bug Something isn't working label Apr 10, 2025
@AntoLC AntoLC self-assigned this Apr 10, 2025
@AntoLC AntoLC requested review from lunika and Copilot April 10, 2025 21:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/frontend/apps/impress/conf/default.conf: Language not supported

@AntoLC AntoLC linked an issue Apr 10, 2025 that may be closed by this pull request
@lunika
Copy link
Member

lunika commented Apr 13, 2025

I think it can also tested using tilt.

@AntoLC AntoLC force-pushed the fix/nginx-404 branch 2 times, most recently from 25451b0 to 436819b Compare April 22, 2025 10:03
AntoLC and others added 2 commits April 22, 2025 13:21
We improve the nginx way to access to a specific
doc.
We stop to wait for a initial attempt that
give a 404. If we see a UUID in the url we will
redirect to the doc/[id] page. Next will then
manage the 404.
The keycloak configuration used in dev environment is too generic and we
can have a conflict with other project that are using the same ingress
domain. Also the namespace was missing in the keycloak extra ConfigMap
leading to creating it in the default namespace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⚗️ Test with ngnix index
2 participants