Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support basic auth with Maplibre-gl-js for map server #1167

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

benstonezhang
Copy link
Contributor

This work add support of basic auth to work of pull #1038 (Support OpenStreetMap vector tiles with Maplibre-gl-js).
To use it, admin need to fill in username and password in format "user:password" in "Additional Settings" page.

The map server may use basic auth to prevent unauthorized access. Below is a example config for nginx (say martin listen on port 8080).

location /maps/ {
	auth_basic "Maps";
	auth_basic_user_file /etc/nginx/htpasswd.d/maps;

	location ~ /maps/fonts/(.*),(.*)/(.*) {
		try_files /maps/fonts/$1/$3 /maps/fonts/$2/$3 =404;
	}

	location ~ /maps/tiles/(?<fwd_path>.*) {
		include params.d/proxy_params;
		proxy_set_header	X-Rewrite-URL $uri;
		proxy_redirect		off;
		proxy_http_version	1.1;
		proxy_pass	http://127.0.0.1:8080/$fwd_path$is_args$args;
	}
}

@tacruc
Copy link
Collaborator

tacruc commented Nov 25, 2023

@benstonezhang
Copy link
Contributor Author

@tacruc Sorry for that. Just found how to setup Sign-Off in IDEA. Updated.

@tacruc
Copy link
Collaborator

tacruc commented Nov 26, 2023

@tacruc Sorry for that. Just found how to setup Sign-Off in IDEA. Updated.

Don't be sorry. It was a challenge for me when I got started contributing to Nextcloud. I'm thankful for your continued.

@tacruc tacruc enabled auto-merge November 27, 2023 22:04
@tacruc tacruc merged commit 530937b into nextcloud:master Nov 27, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants