Skip to content

Gcloud #99

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

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default defineConfig({
title: "Protomaps Docs",
head: [
["link", { rel: "icon", type: "image/png", href: "/favicon.png" }],
["link", { rel: "apple-touch-icon", type: "image/jpg", href:"https://protomaps.com//apple-touch-icon.jpg" }],
["meta", { property: "og:image", content: "https://protomaps.com/docs_opengraph.jpg" }]
],
description: "Technical Documentation for Protomaps",
Expand Down
12 changes: 8 additions & 4 deletions pmtiles/cloud-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@ S3 CORS Configuration:

```
echo '[{"maxAgeSeconds": 300, "method": ["GET", "HEAD"], "origin": ["https://example.com"], "responseHeader": ["range","etag","if-match"]}]' > cors.json
gsutil cors set cors.json gs://my-bucket-name

gcloud storage buckets update gs://my-bucket-name --cors-file=cors.json
```

#### CORS: gsutil tool
#### CORS: gcloud

Install the [gsutil tool](https://cloud.google.com/storage/docs/gsutil_install)
Install the [gcloud CLI](https://cloud.google.com/sdk/docs/install) to set a [CORS Configuration](https://cloud.google.com/storage/docs/cors-configurations):

```json title="cors.json"
[
Expand All @@ -133,7 +134,10 @@ Install the [gsutil tool](https://cloud.google.com/storage/docs/gsutil_install)
```

```bash
gsutil cors set gcors.json gs://my-bucket-name
# view CORS settings
gcloud storage buckets describe gs://my-bucket-name --format="default(cors_config)"

gcloud storage buckets update gs://my-bucket-name --cors-file=cors.json
```

### Microsoft Azure
Expand Down