Skip to content

Weather-Air Monitor - /api/v2/homepage/weather/data exposes Location #2041

@GAS85

Description

@GAS85

Issue Description

  • Try to enable "Weather-Air Monitor" under Settings >> Tab Editor >> Homepage elements.
  • Set Geo coordinates
  • Allow "Guest"

Now each user who will visit orginizr from the internet will see Weather, but no Location.

  • Check Network and especially /api/v2/homepage/weather/data JOSN --> It is exposes location at least 3 times in a JSON as:
{
    "response": {
        "result": "success",
        "message": null,
        "data": {
            "content": {
                "weather": {
                    "metadata": {
                        "start_timestamp": "2025-12-18T09:07:56Z",
                        "end_timestamp": "2025-12-23T09:07:56Z",
                        "location": {
                            "country": "Germany"
                        }
                    },
                    "data": [
...

Expected Result

No location data provided in a JSON as it not used in UI too.

Workaround

You can remove explicit Country name by apache2, or nginx config:

Apache2

# Remove location fron JSON
<Location /api/v2/homepage/weather/data>
    AddOutputFilterByType INFLATE;SUBSTITUTE application/json
    SubstituteMaxLineLength 500K
    Substitute "s|Germany|Not provided|inq"
</Location>

nginx

location = /api/v2/homepage/weather/data {
    gzip off;
    sub_filter_types application/json;
    sub_filter "Germany" "Not provided";
    sub_filter_once off;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions