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

Add RequestHeaders properly to relevant raster overlays #1597

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

azrogers
Copy link
Contributor

Fixes CesiumGS/cesium-native#1067, at least for Unreal. This change adds RequestHeaders properties to CesiumTileMapServiceRasterOverlay, CesiumUrlTemplateRasterOverlay, CesiumWebMapServiceRasterOverlay, and CesiumWebMapTileServiceRasterOverlay, allowing custom HTTP request headers to be specified on each.

Base automatically changed from request-headers-tileset to main January 29, 2025 11:14
Copy link
Member

@kring kring left a comment

Choose a reason for hiding this comment

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

Looks great! I just have the same small suggestion repeated four time. It's a trivial one so I'll make that change myself and merge this.


std::vector<CesiumAsync::IAssetAccessor::THeader> headers;

for (auto& [Key, Value] : this->RequestHeaders) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (auto& [Key, Value] : this->RequestHeaders) {
for (const auto& [Key, Value] : this->RequestHeaders) {

@@ -55,10 +55,18 @@ UCesiumUrlTemplateRasterOverlay::CreateOverlay(
RootTilesY);
}

std::vector<CesiumAsync::IAssetAccessor::THeader> headers;

for (auto& [Key, Value] : this->RequestHeaders) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (auto& [Key, Value] : this->RequestHeaders) {
for (const auto& [Key, Value] : this->RequestHeaders) {


std::vector<CesiumAsync::IAssetAccessor::THeader> headers;

for (auto& [Key, Value] : this->RequestHeaders) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (auto& [Key, Value] : this->RequestHeaders) {
for (const auto& [Key, Value] : this->RequestHeaders) {


std::vector<CesiumAsync::IAssetAccessor::THeader> headers;

for (auto& [Key, Value] : this->RequestHeaders) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (auto& [Key, Value] : this->RequestHeaders) {
for (const auto& [Key, Value] : this->RequestHeaders) {

@kring kring merged commit 7440dcc into main Jan 29, 2025
17 checks passed
@kring kring deleted the request-headers-overlays branch January 29, 2025 12:30
@kring
Copy link
Member

kring commented Jan 29, 2025

Thanks @azrogers!

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.

Allow request headers to be specified in RasterOverlayOptions
2 participants