Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ parameters:
env(APP_POWERED_BY_PHPLIST): '0'
app.preference_page_show_private_lists: '%%env(PREFERENCEPAGE_SHOW_PRIVATE_LISTS)%%'
env(PREFERENCEPAGE_SHOW_PRIVATE_LISTS): '0'
app.rest_api_base_url: '%%env(REST_API_BASE_URL)%%'
env(REST_API_BASE_URL): 'http://api.phplist.local/api/v2'
api_base_url: '%%env(API_BASE_URL)%%'

app.rest_api_base_url: '%%env(API_BASE_URL)%%/api/v2'
app.api_base_url: '%%env(API_BASE_URL)%%'
env(API_BASE_URL): 'http://api.phplist.local/'
Comment on lines +37 to 39

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Normalize the API base URL before appending /api/v2.

The default API_BASE_URL ends with /, so this composition produces http://api.phplist.local//api/v2. Any deployment value with a trailing slash has the same problem, affecting downstream URLs and HTTP stamp values. Either remove the slash from the default and enforce a no-trailing-slash contract, or normalize the value before concatenation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/parameters.yml.dist` around lines 37 - 39, Normalize API_BASE_URL to
remove any trailing slash before appending /api/v2 in app.rest_api_base_url,
while preserving app.api_base_url and downstream URL values without duplicate
slashes. Ensure the default configuration and deployment-provided values follow
the same no-trailing-slash behavior.

app.frontend_base_url: '%%env(FRONT_END_BASE_URL)%%'
env(FRONT_END_BASE_URL): 'http://frontend.phplist.local'

parallel_use_with_phplist3: '%%env(parallel_use_with_phplist3)%%'
env(parallel_use_with_phplist3): '0'

Expand Down
Loading