geopython / geopython/pygeoapi

The url configuration paramater does not respect the trailing slash as the application root

Open
#2,361 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
624
Forks
326
Avg merge
8h 25m
Merged PRs (30d)
2

Description

**Description**
A clear and concise description of what the bug is.

the url configuration paramater does not respect the trailing slash as the application root

`url: http://localhost:5000/somepath/api/` so base urls are generated without the trailing slash

**Steps to Reproduce**
Steps to reproduce the behavior:

add `url: http://localhost:5000/somepath/api/` the pygeoapi yml configuration

**Expected behavior**
A clear and concise description of what you expected to happen.

The expectation is that the url respects the trailing slash for a base url and links are generated appropriately

so setting `http://localhost:5000/somepath/api/` should generate root level urls as `http://localhost:5000/somepath/api/?f=jsonld` or `http://localhost:5000/somepath/api/` NOT `http://localhost:5000/somepath/api?f=jsonld?` or `http://localhost:5000/somepath/api`

**Screenshots/Tracebacks**
If applicable, add screenshots to help explain your problem.

**Environment**
- OS: RHEL 9.x
- Python version: 3.12
- pygeoapi version: 0.23.0

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.