plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
427 stars 575 forks source link

RAZZLE_INTERNAL_API_PATH is always required? #5954

Open csanahuja opened 3 weeks ago

csanahuja commented 3 weeks ago

Describe the bug When I started volto either in dev mode or prod mode without RAZZLE_INTERNAL_API_PATH the redirects were not working. I mean the aliases you can either configure in controlpanel or in each object

To Reproduce See this for context: https://community.plone.org/t/volto-alternate-link-redirect-returns-error-500-solved/19400/2 Essentialy:

Expected behavior I would expect the env var not to be required if Plone is in standard path or if its in different path RAZZLE_DEV_PROXY_API_PATH to be sufficient

Software (please complete the following information):

davisagli commented 2 weeks ago

I can't reproduce this on the current main branch of volto

csanahuja commented 2 weeks ago

I can reproduce it with this docker-compose.yml. Maybe in this example it does not make sense to use RAZZLE_DEV_PROXY_PAI_PATH instead of RAZZLE_INTERNAL_API_PATH but it is just to prove that without the later the aliases fail.

version: "3"
services:

  frontend:
   image: plone/plone-frontend:18.0.0-alpha.27
   environment:
     RAZZLE_DEV_PROXY_API_PATH: http://backend:8080/Plone
   ports:
   - "3000:3000"
   depends_on:
     - backend

  backend:
    image: plone/plone-backend:6.0
    environment:
      SITE: Plone
    volumes:
      - data:/data
    ports:
    - "8080:8080"

volumes:
  data: {}