Skip to content

CORS Error when hostin tile proxy on subdomain #5

@jhit

Description

@jhit

Hi @NlL5

I use the updated tile proxy on a dedicated sub-domain.
I have set a referrer to limit access to the tile proxy.

currently the code will cause a cors error in this setup because the required header 'Access-Control-Allow-Origin: *' is never set in the code.

I would like to contribute this fix but want to start a discussion before submitting any changes.

My Idea currently is:

default the $referrer to '*'. Use the $referrer to always create the cors header in

public function handle(): void

Enable the code to use more than one $referrer.

If a referrer other than '*' is set then also limit the CORS header to the given URLs of the $referrer.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions