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

fix(maps): enable CORS for style json response #983

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Jan 7, 2025

Fixes #981

@achou11 achou11 requested a review from gmaclennan January 7, 2025 21:01
Comment on lines -50 to -58
export function createStyleJsonResponseHeaders(lastModified) {
return {
'Cache-Control': 'max-age=' + 5 * 60, // 5 minutes
'Access-Control-Allow-Headers':
'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since',
'Access-Control-Allow-Origin': '*',
'Last-Modified': lastModified.toUTCString(),
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function is no longer used but does imply that we used to do the right thing 😄 wondering if any of these headers should be added as well 🤔

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.

[maps] Potential CORS issue when proxying online map style jsons
1 participant