File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -112,11 +112,14 @@ class Potree2Node extends PointCloudNode {
112
112
const first = byteOffset ;
113
113
const last = first + byteSize - 1n ;
114
114
115
+ // When we specify 'multipart/byteranges' on headers request it trigger a preflight request
116
+ // Actually github doesn't support it https://github.com/orgs/community/discussions/24659
117
+ // But if we omit header parameter, github seems to know it's a 'multipart/byteranges' request (thanks to 'Range' parameter)
115
118
const networkOptions = {
116
119
...this . layer . source . networkOptions ,
117
120
headers : {
118
121
...this . layer . source . networkOptions . headers ,
119
- ' content-type' : 'multipart/byteranges' ,
122
+ ... ( this . url . startsWith ( 'https://raw.githubusercontent.com' ) ? { } : { ' content-type' : 'multipart/byteranges' } ) ,
120
123
Range : `bytes=${ first } -${ last } ` ,
121
124
} ,
122
125
} ;
You can’t perform that action at this time.
0 commit comments