├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── providers.json └── server.go /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.8 2 | 3 | WORKDIR /go/src/app 4 | COPY . . 5 | 6 | RUN go get -d -v ./... 7 | RUN go install -v ./... 8 | 9 | EXPOSE 80 10 | 11 | CMD ["app", "-blacklist_ranges", "10.0.0.0/8 172.16.0.0/12 192.168.0.0/16", "-host", "0.0.0.0", "-port", "80"] 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Vitaly Dyatlov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # proclink-api 2 | 3 | API Server to process URLs and retrieve oEmbed info out of target pages. 4 | 5 | The server returns oembed information for ANY url ( if they respond within provided time limit :) ) 6 | 7 | To run it and disable access to private ip ranges, do: 8 | 9 | `./server -blacklist_ranges "10.0.0.0/8 172.16.0.0/12 192.168.0.0/16"` 10 | 11 | ### Demo server & request examples: 12 | 13 | * Normal site info retrieval: 14 | - https://proclink.now.sh/?url=https://techcrunch.com 15 | 16 | * Info retrieval from url which responds slowly (3 seconds delay): 17 | - https://proclink.now.sh/?url=http://www.deelay.me/3000/http://placehold.it/300x500 18 | -------------------------------------------------------------------------------- /providers.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "provider_name": "23HQ", 4 | "provider_url": "http:\/\/www.23hq.com", 5 | "endpoints": [ 6 | { 7 | "schemes": [ 8 | "http:\/\/www.23hq.com\/*\/photo\/*" 9 | ], 10 | "url": "http:\/\/www.23hq.com\/23\/oembed" 11 | } 12 | ] 13 | }, 14 | { 15 | "provider_name": "Alpha App Net", 16 | "provider_url": "https:\/\/alpha.app.net\/browse\/posts\/", 17 | "endpoints": [ 18 | { 19 | "schemes": [ 20 | "https:\/\/alpha.app.net\/*\/post\/*", 21 | "https:\/\/photos.app.net\/*\/*" 22 | ], 23 | "url": "https:\/\/alpha-api.app.net\/oembed", 24 | "formats": [ 25 | "json" 26 | ] 27 | } 28 | ] 29 | }, 30 | { 31 | "provider_name": "amCharts Live Editor", 32 | "provider_url": "http:\/\/live.amcharts.com\/", 33 | "endpoints": [ 34 | { 35 | "schemes": [ 36 | "http:\/\/live.amcharts.com\/*" 37 | ], 38 | "url": "http:\/\/live.amcharts.com\/oembed" 39 | } 40 | ] 41 | }, 42 | { 43 | "provider_name": "Animatron", 44 | "provider_url": "https:\/\/www.animatron.com\/", 45 | "endpoints": [ 46 | { 47 | "schemes": [ 48 | "https:\/\/www.animatron.com\/project\/*", 49 | "https:\/\/animatron.com\/project\/*" 50 | ], 51 | "url": "https:\/\/animatron.com\/oembed\/json", 52 | "discovery": true 53 | } 54 | ] 55 | }, 56 | { 57 | "provider_name": "Animoto", 58 | "provider_url": "http:\/\/animoto.com\/", 59 | "endpoints": [ 60 | { 61 | "schemes": [ 62 | "http:\/\/animoto.com\/play\/*" 63 | ], 64 | "url": "http:\/\/animoto.com\/oembeds\/create" 65 | } 66 | ] 67 | }, 68 | { 69 | "provider_name": "AudioSnaps", 70 | "provider_url": "http:\/\/audiosnaps.com", 71 | "endpoints": [ 72 | { 73 | "schemes": [ 74 | "http:\/\/audiosnaps.com\/k\/*" 75 | ], 76 | "url": "http:\/\/audiosnaps.com\/service\/oembed", 77 | "discovery": true 78 | } 79 | ] 80 | }, 81 | { 82 | "provider_name": "Blackfire.io", 83 | "provider_url": "https:\/\/blackfire.io", 84 | "endpoints": [ 85 | { 86 | "schemes": [ 87 | "https:\/\/blackfire.io\/profiles\/*\/graph", 88 | "https:\/\/blackfire.io\/profiles\/compare\/*\/graph" 89 | ], 90 | "url": "https:\/\/blackfire.io\/oembed", 91 | "discovery": true 92 | } 93 | ] 94 | }, 95 | { 96 | "provider_name": "Box Office Buz", 97 | "provider_url": "http:\/\/boxofficebuz.com", 98 | "endpoints": [ 99 | { 100 | "url": "http:\/\/boxofficebuz.com\/oembed", 101 | "discovery": true 102 | } 103 | ] 104 | }, 105 | { 106 | "provider_name": "Cacoo", 107 | "provider_url": "https:\/\/cacoo.com", 108 | "endpoints": [ 109 | { 110 | "schemes": [ 111 | "https:\/\/cacoo.com\/diagrams\/*" 112 | ], 113 | "url": "http:\/\/cacoo.com\/oembed.{format}" 114 | } 115 | ] 116 | }, 117 | { 118 | "provider_name": "CatBoat", 119 | "provider_url": "http:\/\/img.catbo.at\/", 120 | "endpoints": [ 121 | { 122 | "schemes": [ 123 | "http:\/\/img.catbo.at\/*" 124 | ], 125 | "url": "http:\/\/img.catbo.at\/oembed.json", 126 | "formats": [ 127 | "json" 128 | ] 129 | } 130 | ] 131 | }, 132 | { 133 | "provider_name": "ChartBlocks", 134 | "provider_url": "http:\/\/www.chartblocks.com\/", 135 | "endpoints": [ 136 | { 137 | "schemes": [ 138 | "http:\/\/public.chartblocks.com\/c\/*" 139 | ], 140 | "url": "http:\/\/embed.chartblocks.com\/1.0\/oembed" 141 | } 142 | ] 143 | }, 144 | { 145 | "provider_name": "chirbit.com", 146 | "provider_url": "http:\/\/www.chirbit.com\/", 147 | "endpoints": [ 148 | { 149 | "schemes": [ 150 | "http:\/\/chirb.it\/*" 151 | ], 152 | "url": "http:\/\/chirb.it\/oembed.{format}", 153 | "discovery": true 154 | } 155 | ] 156 | }, 157 | { 158 | "provider_name": "CircuitLab", 159 | "provider_url": "https:\/\/www.circuitlab.com\/", 160 | "endpoints": [ 161 | { 162 | "schemes": [ 163 | "https:\/\/www.circuitlab.com\/circuit\/*" 164 | ], 165 | "url": "https:\/\/www.circuitlab.com\/circuit\/oembed\/", 166 | "discovery": true 167 | } 168 | ] 169 | }, 170 | { 171 | "provider_name": "Clipland", 172 | "provider_url": "http:\/\/www.clipland.com\/", 173 | "endpoints": [ 174 | { 175 | "schemes": [ 176 | "http:\/\/www.clipland.com\/v\/*", 177 | "https:\/\/www.clipland.com\/v\/*" 178 | ], 179 | "url": "https:\/\/www.clipland.com\/api\/oembed", 180 | "discovery": true 181 | } 182 | ] 183 | }, 184 | { 185 | "provider_name": "Clyp", 186 | "provider_url": "http:\/\/clyp.it\/", 187 | "endpoints": [ 188 | { 189 | "schemes": [ 190 | "http:\/\/clyp.it\/*", 191 | "http:\/\/clyp.it\/playlist\/*" 192 | ], 193 | "url": "http:\/\/api.clyp.it\/oembed\/", 194 | "discovery": true 195 | } 196 | ] 197 | }, 198 | { 199 | "provider_name": "Codepen", 200 | "provider_url": "https:\/\/codepen.io", 201 | "endpoints": [ 202 | { 203 | "schemes": [ 204 | "http:\/\/codepen.io\/*", 205 | "https:\/\/codepen.io\/*" 206 | ], 207 | "url": "http:\/\/codepen.io\/api\/oembed" 208 | } 209 | ] 210 | }, 211 | { 212 | "provider_name": "Codepoints", 213 | "provider_url": "https:\/\/codepoints.net", 214 | "endpoints": [ 215 | { 216 | "schemes": [ 217 | "http:\/\/codepoints.net\/*", 218 | "https:\/\/codepoints.net\/*", 219 | "http:\/\/www.codepoints.net\/*", 220 | "https:\/\/www.codepoints.net\/*" 221 | ], 222 | "url": "https:\/\/codepoints.net\/api\/v1\/oembed", 223 | "discovery": true 224 | } 225 | ] 226 | }, 227 | { 228 | "provider_name": "CollegeHumor", 229 | "provider_url": "http:\/\/www.collegehumor.com\/", 230 | "endpoints": [ 231 | { 232 | "schemes": [ 233 | "http:\/\/www.collegehumor.com\/video\/*" 234 | ], 235 | "url": "http:\/\/www.collegehumor.com\/oembed.{format}", 236 | "discovery": true 237 | } 238 | ] 239 | }, 240 | { 241 | "provider_name": "Coub", 242 | "provider_url": "http:\/\/coub.com\/", 243 | "endpoints": [ 244 | { 245 | "schemes": [ 246 | "http:\/\/coub.com\/view\/*", 247 | "http:\/\/coub.com\/embed\/*" 248 | ], 249 | "url": "http:\/\/coub.com\/api\/oembed.{format}" 250 | } 251 | ] 252 | }, 253 | { 254 | "provider_name": "Crowd Ranking", 255 | "provider_url": "http:\/\/crowdranking.com", 256 | "endpoints": [ 257 | { 258 | "schemes": [ 259 | "http:\/\/crowdranking.com\/*\/*" 260 | ], 261 | "url": "http:\/\/crowdranking.com\/api\/oembed.{format}" 262 | } 263 | ] 264 | }, 265 | { 266 | "provider_name": "Daily Mile", 267 | "provider_url": "http:\/\/www.dailymile.com", 268 | "endpoints": [ 269 | { 270 | "schemes": [ 271 | "http:\/\/www.dailymile.com\/people\/*\/entries\/*" 272 | ], 273 | "url": "http:\/\/api.dailymile.com\/oembed?format=json", 274 | "formats": [ 275 | "json" 276 | ] 277 | } 278 | ] 279 | }, 280 | { 281 | "provider_name": "Dailymotion", 282 | "provider_url": "http:\/\/www.dailymotion.com", 283 | "endpoints": [ 284 | { 285 | "schemes": [ 286 | "http:\/\/www.dailymotion.com\/video\/*" 287 | ], 288 | "url": "http:\/\/www.dailymotion.com\/services\/oembed", 289 | "discovery": true 290 | } 291 | ] 292 | }, 293 | { 294 | "provider_name": "Deviantart.com", 295 | "provider_url": "http:\/\/www.deviantart.com", 296 | "endpoints": [ 297 | { 298 | "schemes": [ 299 | "http:\/\/*.deviantart.com\/art\/*", 300 | "http:\/\/*.deviantart.com\/*#\/d*", 301 | "http:\/\/fav.me\/*", 302 | "http:\/\/sta.sh\/*" 303 | ], 304 | "url": "http:\/\/backend.deviantart.com\/oembed" 305 | } 306 | ] 307 | }, 308 | { 309 | "provider_name": "Didacte", 310 | "provider_url": "https:\/\/www.didacte.com\/", 311 | "endpoints": [ 312 | { 313 | "schemes": [ 314 | "https:\/\/*.didacte.com\/a\/course\/*" 315 | ], 316 | "url": "https:\/\/*.didacte.com\/cards\/oembed'", 317 | "discovery": true, 318 | "formats": [ 319 | "json" 320 | ] 321 | } 322 | ] 323 | }, 324 | { 325 | "provider_name": "Dipity", 326 | "provider_url": "http:\/\/www.dipity.com", 327 | "endpoints": [ 328 | { 329 | "schemes": [ 330 | "http:\/\/www.dipity.com\/*\/*\/" 331 | ], 332 | "url": "http:\/\/www.dipity.com\/oembed\/timeline\/" 333 | } 334 | ] 335 | }, 336 | { 337 | "provider_name": "Docs", 338 | "provider_url": "https:\/\/www.docs.com", 339 | "endpoints": [ 340 | { 341 | "schemes": [ 342 | "https:\/\/docs.com\/*", 343 | "https:\/\/www.docs.com\/*" 344 | ], 345 | "url": "https:\/\/docs.com\/api\/oembed", 346 | "discovery": true 347 | } 348 | ] 349 | }, 350 | { 351 | "provider_name": "Dotsub", 352 | "provider_url": "http:\/\/dotsub.com\/", 353 | "endpoints": [ 354 | { 355 | "schemes": [ 356 | "http:\/\/dotsub.com\/view\/*" 357 | ], 358 | "url": "http:\/\/dotsub.com\/services\/oembed" 359 | } 360 | ] 361 | }, 362 | { 363 | "provider_name": "edocr", 364 | "provider_url": "http:\/\/www.edocr.com", 365 | "endpoints": [ 366 | { 367 | "schemes": [ 368 | "http:\/\/edocr.com\/docs\/*" 369 | ], 370 | "url": "http:\/\/edocr.com\/api\/oembed" 371 | } 372 | ] 373 | }, 374 | { 375 | "provider_name": "eduMedia", 376 | "provider_url": "https:\/\/www.edumedia-sciences.com\/", 377 | "endpoints": [ 378 | { 379 | "url": "https:\/\/www.edumedia-sciences.com\/oembed.json", 380 | "discovery": true 381 | }, 382 | { 383 | "url": "https:\/\/www.edumedia-sciences.com\/oembed.xml", 384 | "discovery": true 385 | } 386 | ] 387 | }, 388 | { 389 | "provider_name": "EgliseInfo", 390 | "provider_url": "http:\/\/egliseinfo.catholique.fr\/", 391 | "endpoints": [ 392 | { 393 | "schemes": [ 394 | "http:\/\/egliseinfo.catholique.fr\/*" 395 | ], 396 | "url": "http:\/\/egliseinfo.catholique.fr\/api\/oembed", 397 | "discovery": true 398 | } 399 | ] 400 | }, 401 | { 402 | "provider_name": "Embed Articles", 403 | "provider_url": "http:\/\/embedarticles.com\/", 404 | "endpoints": [ 405 | { 406 | "schemes": [ 407 | "http:\/\/embedarticles.com\/*" 408 | ], 409 | "url": "http:\/\/embedarticles.com\/oembed\/" 410 | } 411 | ] 412 | }, 413 | { 414 | "provider_name": "Embedly", 415 | "provider_url": "http:\/\/api.embed.ly\/", 416 | "endpoints": [ 417 | { 418 | "url": "http:\/\/api.embed.ly\/1\/oembed" 419 | } 420 | ] 421 | }, 422 | { 423 | "provider_name": "Eyrie", 424 | "provider_url": "https:\/\/eyrie.io\/", 425 | "endpoints": [ 426 | { 427 | "schemes": [ 428 | "https:\/\/eyrie.io\/board\/*", 429 | "https:\/\/eyrie.io\/sparkfun\/*" 430 | ], 431 | "url": "https:\/\/eyrie.io\/v1\/oembed", 432 | "discovery": true 433 | } 434 | ] 435 | }, 436 | { 437 | "provider_name": "Facebook (Video)", 438 | "provider_url": "https:\/\/www.facebook.com\/", 439 | "endpoints": [ 440 | { 441 | "schemes": [ 442 | "https:\/\/www.facebook.com\/*\/videos\/*", 443 | "https:\/\/www.facebook.com\/video.php" 444 | ], 445 | "url": "https:\/\/www.facebook.com\/plugins\/video\/oembed.json", 446 | "discovery": true 447 | } 448 | ] 449 | }, 450 | { 451 | "provider_name": "Flat", 452 | "provider_url": "https:\/\/flat.io", 453 | "endpoints": [ 454 | { 455 | "schemes": [ 456 | "https:\/\/flat.io\/score\/*", 457 | "https:\/\/*.flat.io\/score\/*" 458 | ], 459 | "url": "https:\/\/flat.io\/services\/oembed", 460 | "discovery": true 461 | } 462 | ] 463 | }, 464 | { 465 | "provider_name": "Flickr", 466 | "provider_url": "http:\/\/www.flickr.com\/", 467 | "endpoints": [ 468 | { 469 | "schemes": [ 470 | "http:\/\/*.flickr.com\/photos\/*", 471 | "http:\/\/flic.kr\/p\/*" 472 | ], 473 | "url": "http:\/\/www.flickr.com\/services\/oembed\/", 474 | "discovery": true 475 | } 476 | ] 477 | }, 478 | { 479 | "provider_name": "FOX SPORTS Australia", 480 | "provider_url": "http:\/\/www.foxsports.com.au", 481 | "endpoints": [ 482 | { 483 | "schemes": [ 484 | "http:\/\/fiso.foxsports.com.au\/isomorphic-widget\/*", 485 | "https:\/\/fiso.foxsports.com.au\/isomorphic-widget\/*" 486 | ], 487 | "url": "https:\/\/fiso.foxsports.com.au\/oembed" 488 | } 489 | ] 490 | }, 491 | { 492 | "provider_name": "FrameBuzz", 493 | "provider_url": "https:\/\/framebuzz.com\/", 494 | "endpoints": [ 495 | { 496 | "schemes": [ 497 | "http:\/\/framebuzz.com\/v\/*", 498 | "https:\/\/framebuzz.com\/v\/*" 499 | ], 500 | "url": "https:\/\/framebuzz.com\/oembed\/", 501 | "discovery": true 502 | } 503 | ] 504 | }, 505 | { 506 | "provider_name": "FunnyOrDie", 507 | "provider_url": "http:\/\/www.funnyordie.com\/", 508 | "endpoints": [ 509 | { 510 | "schemes": [ 511 | "http:\/\/www.funnyordie.com\/videos\/*" 512 | ], 513 | "url": "http:\/\/www.funnyordie.com\/oembed.{format}" 514 | } 515 | ] 516 | }, 517 | { 518 | "provider_name": "Geograph Britain and Ireland", 519 | "provider_url": "https:\/\/www.geograph.org.uk\/", 520 | "endpoints": [ 521 | { 522 | "schemes": [ 523 | "http:\/\/*.geograph.org.uk\/*", 524 | "http:\/\/*.geograph.co.uk\/*", 525 | "http:\/\/*.geograph.ie\/*", 526 | "http:\/\/*.wikimedia.org\/*_geograph.org.uk_*" 527 | ], 528 | "url": "http:\/\/api.geograph.org.uk\/api\/oembed" 529 | } 530 | ] 531 | }, 532 | { 533 | "provider_name": "Geograph Channel Islands", 534 | "provider_url": "http:\/\/channel-islands.geograph.org\/", 535 | "endpoints": [ 536 | { 537 | "schemes": [ 538 | "http:\/\/*.geograph.org.gg\/*", 539 | "http:\/\/*.geograph.org.je\/*", 540 | "http:\/\/channel-islands.geograph.org\/*", 541 | "http:\/\/channel-islands.geographs.org\/*", 542 | "http:\/\/*.channel.geographs.org\/*" 543 | ], 544 | "url": "http:\/\/www.geograph.org.gg\/api\/oembed" 545 | } 546 | ] 547 | }, 548 | { 549 | "provider_name": "Geograph Germany", 550 | "provider_url": "http:\/\/geo-en.hlipp.de\/", 551 | "endpoints": [ 552 | { 553 | "schemes": [ 554 | "http:\/\/geo-en.hlipp.de\/*", 555 | "http:\/\/geo.hlipp.de\/*", 556 | "http:\/\/germany.geograph.org\/*" 557 | ], 558 | "url": "http:\/\/geo.hlipp.de\/restapi.php\/api\/oembed" 559 | } 560 | ] 561 | }, 562 | { 563 | "provider_name": "Getty Images", 564 | "provider_url": "http:\/\/www.gettyimages.com\/", 565 | "endpoints": [ 566 | { 567 | "schemes": [ 568 | "http:\/\/gty.im\/*" 569 | ], 570 | "url": "http:\/\/embed.gettyimages.com\/oembed", 571 | "formats": [ 572 | "json" 573 | ] 574 | } 575 | ] 576 | }, 577 | { 578 | "provider_name": "Gfycat", 579 | "provider_url": "https:\/\/gfycat.com\/", 580 | "endpoints": [ 581 | { 582 | "schemes": [ 583 | "http:\/\/gfycat.com\/*", 584 | "http:\/\/www.gfycat.com\/*", 585 | "https:\/\/gfycat.com\/*", 586 | "https:\/\/www.gfycat.com\/*" 587 | ], 588 | "url": "https:\/\/api.gfycat.com\/v1\/oembed", 589 | "discovery": true 590 | } 591 | ] 592 | }, 593 | { 594 | "provider_name": "GIPHY", 595 | "provider_url": "https:\/\/giphy.com", 596 | "endpoints": [ 597 | { 598 | "schemes": [ 599 | "https:\/\/giphy.com\/gifs\/*", 600 | "http:\/\/gph.is\/*", 601 | "https:\/\/media.giphy.com\/media\/*\/giphy.gif" 602 | ], 603 | "url": "http:\/\/giphy.com\/services\/oembed", 604 | "discovery": true 605 | } 606 | ] 607 | }, 608 | { 609 | "provider_name": "Gyazo", 610 | "provider_url": "https:\/\/gyazo.com", 611 | "endpoints": [ 612 | { 613 | "schemes": [ 614 | "https:\/\/gyazo.com\/*" 615 | ], 616 | "url": "https:\/\/api.gyazo.com\/api\/oembed", 617 | "formats": [ 618 | "json" 619 | ] 620 | } 621 | ] 622 | }, 623 | { 624 | "provider_name": "HuffDuffer", 625 | "provider_url": "http:\/\/huffduffer.com", 626 | "endpoints": [ 627 | { 628 | "schemes": [ 629 | "http:\/\/huffduffer.com\/*\/*" 630 | ], 631 | "url": "http:\/\/huffduffer.com\/oembed" 632 | } 633 | ] 634 | }, 635 | { 636 | "provider_name": "Hulu", 637 | "provider_url": "http:\/\/www.hulu.com\/", 638 | "endpoints": [ 639 | { 640 | "schemes": [ 641 | "http:\/\/www.hulu.com\/watch\/*" 642 | ], 643 | "url": "http:\/\/www.hulu.com\/api\/oembed.{format}" 644 | } 645 | ] 646 | }, 647 | { 648 | "provider_name": "iFixit", 649 | "provider_url": "http:\/\/www.iFixit.com", 650 | "endpoints": [ 651 | { 652 | "schemes": [ 653 | "http:\/\/www.ifixit.com\/Guide\/View\/*" 654 | ], 655 | "url": "http:\/\/www.ifixit.com\/Embed" 656 | } 657 | ] 658 | }, 659 | { 660 | "provider_name": "IFTTT", 661 | "provider_url": "http:\/\/www.ifttt.com\/", 662 | "endpoints": [ 663 | { 664 | "schemes": [ 665 | "http:\/\/ifttt.com\/recipes\/*" 666 | ], 667 | "url": "http:\/\/www.ifttt.com\/oembed\/", 668 | "discovery": true 669 | } 670 | ] 671 | }, 672 | { 673 | "provider_name": "Indaco", 674 | "provider_url": "https:\/\/player.indacolive.com\/", 675 | "endpoints": [ 676 | { 677 | "schemes": [ 678 | "https:\/\/player.indacolive.com\/player\/jwp\/clients\/*" 679 | ], 680 | "url": "https:\/\/player.indacolive.com\/services\/oembed", 681 | "formats": [ 682 | "json" 683 | ] 684 | } 685 | ] 686 | }, 687 | { 688 | "provider_name": "Infogram", 689 | "provider_url": "https:\/\/infogr.am\/", 690 | "endpoints": [ 691 | { 692 | "schemes": [ 693 | "https:\/\/infogr.am\/*" 694 | ], 695 | "url": "https:\/\/infogr.am\/oembed" 696 | } 697 | ] 698 | }, 699 | { 700 | "provider_name": "Inoreader", 701 | "provider_url": "https:\/\/www.inoreader.com", 702 | "endpoints": [ 703 | { 704 | "schemes": [ 705 | "https:\/\/www.inoreader.com\/oembed\/" 706 | ], 707 | "url": "https:\/\/www.inoreader.com\/oembed\/api\/", 708 | "discovery": true 709 | } 710 | ] 711 | }, 712 | { 713 | "provider_name": "inphood", 714 | "provider_url": "http:\/\/inphood.com\/", 715 | "endpoints": [ 716 | { 717 | "schemes": [ 718 | "http:\/\/*.inphood.com\/*" 719 | ], 720 | "url": "http:\/\/api.inphood.com\/oembed", 721 | "formats": [ 722 | "json" 723 | ] 724 | } 725 | ] 726 | }, 727 | { 728 | "provider_name": "Instagram", 729 | "provider_url": "https:\/\/instagram.com", 730 | "endpoints": [ 731 | { 732 | "schemes": [ 733 | "http:\/\/instagram.com\/p\/*", 734 | "http:\/\/instagr.am\/p\/*", 735 | "https:\/\/instagram.com\/p\/*", 736 | "https:\/\/instagr.am\/p\/*", 737 | "http:\/\/www.instagram.com\/p\/*", 738 | "http:\/\/www.instagr.am\/p\/*", 739 | "https:\/\/www.instagram.com\/p\/*", 740 | "https:\/\/www.instagr.am\/p\/*" 741 | ], 742 | "url": "http:\/\/api.instagram.com\/oembed", 743 | "formats": [ 744 | "json" 745 | ] 746 | } 747 | ] 748 | }, 749 | { 750 | "provider_name": "iSnare Articles", 751 | "provider_url": "https:\/\/www.isnare.com\/", 752 | "endpoints": [ 753 | { 754 | "schemes": [ 755 | "https:\/\/www.isnare.com\/*" 756 | ], 757 | "url": "https:\/\/www.isnare.com\/oembed\/" 758 | } 759 | ] 760 | }, 761 | { 762 | "provider_name": "Kickstarter", 763 | "provider_url": "http:\/\/www.kickstarter.com", 764 | "endpoints": [ 765 | { 766 | "schemes": [ 767 | "http:\/\/www.kickstarter.com\/projects\/*" 768 | ], 769 | "url": "http:\/\/www.kickstarter.com\/services\/oembed" 770 | } 771 | ] 772 | }, 773 | { 774 | "provider_name": "Kidoju", 775 | "provider_url": "https:\/\/www.kidoju.com\/", 776 | "endpoints": [ 777 | { 778 | "schemes": [ 779 | "https:\/\/www.kidoju.com\/en\/x\/*\/*", 780 | "https:\/\/www.kidoju.com\/fr\/x\/*\/*" 781 | ], 782 | "url": "https:\/\/www.kidoju.com\/api\/oembed" 783 | } 784 | ] 785 | }, 786 | { 787 | "provider_name": "Kit", 788 | "provider_url": "https:\/\/kit.com\/", 789 | "endpoints": [ 790 | { 791 | "schemes": [ 792 | "http:\/\/kit.com\/*\/*", 793 | "https:\/\/kit.com\/*\/*" 794 | ], 795 | "url": "https:\/\/embed.kit.com\/oembed", 796 | "discovery": true 797 | } 798 | ] 799 | }, 800 | { 801 | "provider_name": "Kitchenbowl", 802 | "provider_url": "http:\/\/www.kitchenbowl.com", 803 | "endpoints": [ 804 | { 805 | "schemes": [ 806 | "http:\/\/www.kitchenbowl.com\/recipe\/*" 807 | ], 808 | "url": "http:\/\/www.kitchenbowl.com\/oembed", 809 | "discovery": true 810 | } 811 | ] 812 | }, 813 | { 814 | "provider_name": "Knacki", 815 | "provider_url": "http:\/\/jdr.knacki.info", 816 | "endpoints": [ 817 | { 818 | "schemes": [ 819 | "http:\/\/jdr.knacki.info\/meuh\/*", 820 | "https:\/\/jdr.knacki.info\/meuh\/*" 821 | ], 822 | "url": "https:\/\/jdr.knacki.info\/oembed" 823 | } 824 | ] 825 | }, 826 | { 827 | "provider_name": "LearningApps.org", 828 | "provider_url": "http:\/\/learningapps.org\/", 829 | "endpoints": [ 830 | { 831 | "schemes": [ 832 | "http:\/\/learningapps.org\/*" 833 | ], 834 | "url": "http:\/\/learningapps.org\/oembed.php", 835 | "discovery": true 836 | } 837 | ] 838 | }, 839 | { 840 | "provider_name": "MathEmbed", 841 | "provider_url": "http:\/\/mathembed.com", 842 | "endpoints": [ 843 | { 844 | "schemes": [ 845 | "http:\/\/mathembed.com\/latex?inputText=*", 846 | "http:\/\/mathembed.com\/latex?inputText=*" 847 | ], 848 | "url": "http:\/\/mathembed.com\/oembed" 849 | } 850 | ] 851 | }, 852 | { 853 | "provider_name": "me.me", 854 | "provider_url": "https:\/\/me.me\/", 855 | "endpoints": [ 856 | { 857 | "schemes": [ 858 | "https:\/\/me.me\/i\/*" 859 | ], 860 | "url": "https:\/\/me.me\/oembed", 861 | "discovery": true 862 | } 863 | ] 864 | }, 865 | { 866 | "provider_name": "Meetup", 867 | "provider_url": "http:\/\/www.meetup.com", 868 | "endpoints": [ 869 | { 870 | "schemes": [ 871 | "http:\/\/meetup.com\/*", 872 | "http:\/\/meetu.ps\/*" 873 | ], 874 | "url": "https:\/\/api.meetup.com\/oembed", 875 | "formats": [ 876 | "json" 877 | ] 878 | } 879 | ] 880 | }, 881 | { 882 | "provider_name": "MixCloud", 883 | "provider_url": "http:\/\/mixcloud.com\/", 884 | "endpoints": [ 885 | { 886 | "schemes": [ 887 | "http:\/\/www.mixcloud.com\/*\/*\/" 888 | ], 889 | "url": "http:\/\/www.mixcloud.com\/oembed\/" 890 | } 891 | ] 892 | }, 893 | { 894 | "provider_name": "Moby Picture", 895 | "provider_url": "http:\/\/www.mobypicture.com", 896 | "endpoints": [ 897 | { 898 | "schemes": [ 899 | "http:\/\/www.mobypicture.com\/user\/*\/view\/*", 900 | "http:\/\/moby.to\/*" 901 | ], 902 | "url": "http:\/\/api.mobypicture.com\/oEmbed" 903 | } 904 | ] 905 | }, 906 | { 907 | "provider_name": "Modelo", 908 | "provider_url": "http:\/\/modelo.io\/", 909 | "endpoints": [ 910 | { 911 | "schemes": [ 912 | "https:\/\/beta.modelo.io\/embedded\/*" 913 | ], 914 | "url": "https:\/\/portal.modelo.io\/oembed", 915 | "discovery": false 916 | } 917 | ] 918 | }, 919 | { 920 | "provider_name": "myBeweeg", 921 | "provider_url": "https:\/\/mybeweeg.com", 922 | "endpoints": [ 923 | { 924 | "schemes": [ 925 | "https:\/\/mybeweeg.com\/w\/*" 926 | ], 927 | "url": "https:\/\/mybeweeg.com\/services\/oembed" 928 | } 929 | ] 930 | }, 931 | { 932 | "provider_name": "nanoo.tv", 933 | "provider_url": "https:\/\/www.nanoo.tv\/", 934 | "endpoints": [ 935 | { 936 | "schemes": [ 937 | "http:\/\/*.nanoo.tv\/link\/*", 938 | "http:\/\/nanoo.tv\/link\/*", 939 | "http:\/\/*.nanoo.pro\/link\/*", 940 | "http:\/\/nanoo.pro\/link\/*", 941 | "https:\/\/*.nanoo.tv\/link\/*", 942 | "https:\/\/nanoo.tv\/link\/*", 943 | "https:\/\/*.nanoo.pro\/link\/*", 944 | "https:\/\/nanoo.pro\/link\/*" 945 | ], 946 | "url": "https:\/\/www.nanoo.tv\/services\/oembed", 947 | "discovery": true 948 | } 949 | ] 950 | }, 951 | { 952 | "provider_name": "nfb.ca", 953 | "provider_url": "http:\/\/www.nfb.ca\/", 954 | "endpoints": [ 955 | { 956 | "schemes": [ 957 | "http:\/\/*.nfb.ca\/film\/*" 958 | ], 959 | "url": "http:\/\/www.nfb.ca\/remote\/services\/oembed\/", 960 | "discovery": true 961 | } 962 | ] 963 | }, 964 | { 965 | "provider_name": "Odds.com.au", 966 | "provider_url": "https:\/\/www.odds.com.au", 967 | "endpoints": [ 968 | { 969 | "schemes": [ 970 | "https:\/\/www.odds.com.au\/*", 971 | "https:\/\/odds.com.au\/*" 972 | ], 973 | "url": "https:\/\/www.odds.com.au\/api\/oembed\/" 974 | } 975 | ] 976 | }, 977 | { 978 | "provider_name": "Office Mix", 979 | "provider_url": "http:\/\/mix.office.com\/", 980 | "endpoints": [ 981 | { 982 | "schemes": [ 983 | "https:\/\/mix.office.com\/watch\/*", 984 | "https:\/\/mix.office.com\/embed\/*" 985 | ], 986 | "url": "https:\/\/mix.office.com\/oembed", 987 | "discovery": true 988 | } 989 | ] 990 | }, 991 | { 992 | "provider_name": "Official FM", 993 | "provider_url": "http:\/\/official.fm", 994 | "endpoints": [ 995 | { 996 | "schemes": [ 997 | "http:\/\/official.fm\/tracks\/*", 998 | "http:\/\/official.fm\/playlists\/*" 999 | ], 1000 | "url": "http:\/\/official.fm\/services\/oembed.{format}" 1001 | } 1002 | ] 1003 | }, 1004 | { 1005 | "provider_name": "On Aol", 1006 | "provider_url": "http:\/\/on.aol.com\/", 1007 | "endpoints": [ 1008 | { 1009 | "schemes": [ 1010 | "http:\/\/on.aol.com\/video\/*" 1011 | ], 1012 | "url": "http:\/\/on.aol.com\/api" 1013 | } 1014 | ] 1015 | }, 1016 | { 1017 | "provider_name": "Ora TV", 1018 | "provider_url": "http:\/\/www.ora.tv\/", 1019 | "endpoints": [ 1020 | { 1021 | "discovery": true, 1022 | "url": "https:\/\/www.ora.tv\/oembed\/*?format={format}" 1023 | } 1024 | ] 1025 | }, 1026 | { 1027 | "provider_name": "Orbitvu", 1028 | "provider_url": "https:\/\/orbitvu.co", 1029 | "endpoints": [ 1030 | { 1031 | "schemes": [ 1032 | "https:\/\/orbitvu.co\/001\/*\/ov3601\/view", 1033 | "https:\/\/orbitvu.co\/001\/*\/ov3601\/*\/view", 1034 | "https:\/\/orbitvu.co\/001\/*\/ov3602\/*\/view", 1035 | "https:\/\/orbitvu.co\/001\/*\/2\/orbittour\/*\/view", 1036 | "https:\/\/orbitvu.co\/001\/*\/1\/2\/orbittour\/*\/view", 1037 | "http:\/\/orbitvu.co\/001\/*\/ov3601\/view", 1038 | "http:\/\/orbitvu.co\/001\/*\/ov3601\/*\/view", 1039 | "http:\/\/orbitvu.co\/001\/*\/ov3602\/*\/view", 1040 | "http:\/\/orbitvu.co\/001\/*\/2\/orbittour\/*\/view", 1041 | "http:\/\/orbitvu.co\/001\/*\/1\/2\/orbittour\/*\/view" 1042 | ], 1043 | "url": "http:\/\/orbitvu.co\/service\/oembed", 1044 | "discovery": true 1045 | } 1046 | ] 1047 | }, 1048 | { 1049 | "provider_name": "Oumy", 1050 | "provider_url": "https:\/\/www.oumy.com\/", 1051 | "endpoints": [ 1052 | { 1053 | "schemes": [ 1054 | "https:\/\/www.oumy.com\/v\/*" 1055 | ], 1056 | "url": "https:\/\/www.oumy.com\/oembed", 1057 | "discovery": true 1058 | } 1059 | ] 1060 | }, 1061 | { 1062 | "provider_name": "Pastery", 1063 | "provider_url": "https:\/\/www.pastery.net", 1064 | "endpoints": [ 1065 | { 1066 | "schemes": [ 1067 | "http:\/\/pastery.net\/*", 1068 | "https:\/\/pastery.net\/*", 1069 | "http:\/\/www.pastery.net\/*", 1070 | "https:\/\/www.pastery.net\/*" 1071 | ], 1072 | "url": "https:\/\/www.pastery.net\/oembed", 1073 | "discovery": true 1074 | } 1075 | ] 1076 | }, 1077 | { 1078 | "provider_name": "Pixdor", 1079 | "provider_url": "http:\/\/www.pixdor.com\/", 1080 | "endpoints": [ 1081 | { 1082 | "schemes": [ 1083 | "https:\/\/store.pixdor.com\/place-marker-widget\/*\/show", 1084 | "https:\/\/store.pixdor.com\/map\/*\/show" 1085 | ], 1086 | "url": "https:\/\/store.pixdor.com\/oembed", 1087 | "formats": [ 1088 | "json", 1089 | "xml" 1090 | ], 1091 | "discovery": true 1092 | } 1093 | ] 1094 | }, 1095 | { 1096 | "provider_name": "Poll Daddy", 1097 | "provider_url": "http:\/\/polldaddy.com", 1098 | "endpoints": [ 1099 | { 1100 | "schemes": [ 1101 | "http:\/\/*.polldaddy.com\/s\/*", 1102 | "http:\/\/*.polldaddy.com\/poll\/*", 1103 | "http:\/\/*.polldaddy.com\/ratings\/*" 1104 | ], 1105 | "url": "http:\/\/polldaddy.com\/oembed\/" 1106 | } 1107 | ] 1108 | }, 1109 | { 1110 | "provider_name": "Port", 1111 | "provider_url": "http:\/\/www.sellwithport.com\/", 1112 | "endpoints": [ 1113 | { 1114 | "schemes": [ 1115 | "https:\/\/app.sellwithport.com\/#\/buyer\/*" 1116 | ], 1117 | "url": "https:\/\/api.sellwithport.com\/v1.0\/buyer\/oembed" 1118 | } 1119 | ] 1120 | }, 1121 | { 1122 | "provider_name": "Portfolium", 1123 | "provider_url": "https:\/\/portfolium.com", 1124 | "endpoints": [ 1125 | { 1126 | "schemes": [ 1127 | "https:\/\/portfolium.com\/entry\/*" 1128 | ], 1129 | "url": "https:\/\/api.portfolium.com\/oembed" 1130 | } 1131 | ] 1132 | }, 1133 | { 1134 | "provider_name": "Punters", 1135 | "provider_url": "https:\/\/www.punters.com.au", 1136 | "endpoints": [ 1137 | { 1138 | "schemes": [ 1139 | "https:\/\/www.punters.com.au\/*", 1140 | "https:\/\/punters.com.au\/*" 1141 | ], 1142 | "url": "https:\/\/www.punters.com.au\/api\/oembed\/" 1143 | } 1144 | ] 1145 | }, 1146 | { 1147 | "provider_name": "Quiz.biz", 1148 | "provider_url": "http:\/\/www.quiz.biz\/", 1149 | "endpoints": [ 1150 | { 1151 | "schemes": [ 1152 | "http:\/\/www.quiz.biz\/quizz-*.html" 1153 | ], 1154 | "url": "http:\/\/www.quiz.biz\/api\/oembed", 1155 | "discovery": true 1156 | } 1157 | ] 1158 | }, 1159 | { 1160 | "provider_name": "Quizz.biz", 1161 | "provider_url": "http:\/\/www.quizz.biz\/", 1162 | "endpoints": [ 1163 | { 1164 | "schemes": [ 1165 | "http:\/\/www.quizz.biz\/quizz-*.html" 1166 | ], 1167 | "url": "http:\/\/www.quizz.biz\/api\/oembed", 1168 | "discovery": true 1169 | } 1170 | ] 1171 | }, 1172 | { 1173 | "provider_name": "RapidEngage", 1174 | "provider_url": "https:\/\/rapidengage.com", 1175 | "endpoints": [ 1176 | { 1177 | "schemes": [ 1178 | "https:\/\/rapidengage.com\/s\/*" 1179 | ], 1180 | "url": "https:\/\/rapidengage.com\/api\/oembed" 1181 | } 1182 | ] 1183 | }, 1184 | { 1185 | "provider_name": "Reddit", 1186 | "provider_url": "https:\/\/reddit.com\/", 1187 | "endpoints": [ 1188 | { 1189 | "schemes": [ 1190 | "https:\/\/reddit.com\/r\/*\/comments\/*\/*" 1191 | ], 1192 | "url": "https:\/\/www.reddit.com\/oembed" 1193 | } 1194 | ] 1195 | }, 1196 | { 1197 | "provider_name": "ReleaseWire", 1198 | "provider_url": "http:\/\/www.releasewire.com\/", 1199 | "endpoints": [ 1200 | { 1201 | "schemes": [ 1202 | "http:\/\/rwire.com\/*" 1203 | ], 1204 | "url": "http:\/\/publisher.releasewire.com\/oembed\/", 1205 | "discovery": true 1206 | } 1207 | ] 1208 | }, 1209 | { 1210 | "provider_name": "RepubHub", 1211 | "provider_url": "http:\/\/repubhub.icopyright.net\/", 1212 | "endpoints": [ 1213 | { 1214 | "schemes": [ 1215 | "http:\/\/repubhub.icopyright.net\/freePost.act?*" 1216 | ], 1217 | "url": "http:\/\/repubhub.icopyright.net\/oembed.act", 1218 | "discovery": true 1219 | } 1220 | ] 1221 | }, 1222 | { 1223 | "provider_name": "ReverbNation", 1224 | "provider_url": "https:\/\/www.reverbnation.com\/", 1225 | "endpoints": [ 1226 | { 1227 | "schemes": [ 1228 | "https:\/\/www.reverbnation.com\/*", 1229 | "https:\/\/www.reverbnation.com\/*\/songs\/*" 1230 | ], 1231 | "url": "https:\/\/www.reverbnation.com\/oembed", 1232 | "discovery": true 1233 | } 1234 | ] 1235 | }, 1236 | { 1237 | "provider_name": "Roomshare", 1238 | "provider_url": "http:\/\/roomshare.jp", 1239 | "endpoints": [ 1240 | { 1241 | "schemes": [ 1242 | "http:\/\/roomshare.jp\/post\/*", 1243 | "http:\/\/roomshare.jp\/en\/post\/*" 1244 | ], 1245 | "url": "http:\/\/roomshare.jp\/en\/oembed.{format}" 1246 | } 1247 | ] 1248 | }, 1249 | { 1250 | "provider_name": "Rumble", 1251 | "provider_url": "https:\/\/rumble.com\/", 1252 | "endpoints": [ 1253 | { 1254 | "url": "https:\/\/rumble.com\/api\/Media\/oembed.{format}", 1255 | "discovery": true 1256 | } 1257 | ] 1258 | }, 1259 | { 1260 | "provider_name": "Sapo Videos", 1261 | "provider_url": "http:\/\/videos.sapo.pt", 1262 | "endpoints": [ 1263 | { 1264 | "schemes": [ 1265 | "http:\/\/videos.sapo.pt\/*" 1266 | ], 1267 | "url": "http:\/\/videos.sapo.pt\/oembed" 1268 | } 1269 | ] 1270 | }, 1271 | { 1272 | "provider_name": "Screen9", 1273 | "provider_url": "http:\/\/www.screen9.com\/", 1274 | "endpoints": [ 1275 | { 1276 | "schemes": [ 1277 | "https:\/\/console.screen9.com\/*", 1278 | "https:\/\/*.screen9.tv\/*" 1279 | ], 1280 | "url": "https:\/\/api.screen9.com\/oembed" 1281 | } 1282 | ] 1283 | }, 1284 | { 1285 | "provider_name": "Screencast.com", 1286 | "provider_url": "http:\/\/www.screencast.com\/", 1287 | "endpoints": [ 1288 | { 1289 | "url": "https:\/\/api.screencast.com\/external\/oembed", 1290 | "discovery": true 1291 | } 1292 | ] 1293 | }, 1294 | { 1295 | "provider_name": "Screenr", 1296 | "provider_url": "http:\/\/www.screenr.com\/", 1297 | "endpoints": [ 1298 | { 1299 | "schemes": [ 1300 | "http:\/\/www.screenr.com\/*\/" 1301 | ], 1302 | "url": "http:\/\/www.screenr.com\/api\/oembed.{format}" 1303 | } 1304 | ] 1305 | }, 1306 | { 1307 | "provider_name": "ScribbleMaps", 1308 | "provider_url": "https:\/\/scribblemaps.com", 1309 | "endpoints": [ 1310 | { 1311 | "schemes": [ 1312 | "http:\/\/www.scribblemaps.com\/maps\/view\/*", 1313 | "https:\/\/www.scribblemaps.com\/maps\/view\/*", 1314 | "http:\/\/scribblemaps.com\/maps\/view\/*", 1315 | "https:\/\/scribblemaps.com\/maps\/view\/*" 1316 | ], 1317 | "url": "https:\/\/scribblemaps.com\/api\/services\/oembed.{format}", 1318 | "discovery": true 1319 | } 1320 | ] 1321 | }, 1322 | { 1323 | "provider_name": "Scribd", 1324 | "provider_url": "http:\/\/www.scribd.com\/", 1325 | "endpoints": [ 1326 | { 1327 | "schemes": [ 1328 | "http:\/\/www.scribd.com\/doc\/*" 1329 | ], 1330 | "url": "http:\/\/www.scribd.com\/services\/oembed\/" 1331 | } 1332 | ] 1333 | }, 1334 | { 1335 | "provider_name": "ShortNote", 1336 | "provider_url": "https:\/\/www.shortnote.jp\/", 1337 | "endpoints": [ 1338 | { 1339 | "schemes": [ 1340 | "https:\/\/www.shortnote.jp\/view\/notes\/*" 1341 | ], 1342 | "url": "https:\/\/www.shortnote.jp\/oembed\/", 1343 | "discovery": true 1344 | } 1345 | ] 1346 | }, 1347 | { 1348 | "provider_name": "Shoudio", 1349 | "provider_url": "http:\/\/shoudio.com", 1350 | "endpoints": [ 1351 | { 1352 | "schemes": [ 1353 | "http:\/\/shoudio.com\/*", 1354 | "http:\/\/shoud.io\/*" 1355 | ], 1356 | "url": "http:\/\/shoudio.com\/api\/oembed" 1357 | } 1358 | ] 1359 | }, 1360 | { 1361 | "provider_name": "Show the Way, actionable location info", 1362 | "provider_url": "https:\/\/showtheway.io", 1363 | "endpoints": [ 1364 | { 1365 | "schemes": [ 1366 | "https:\/\/showtheway.io\/to\/*" 1367 | ], 1368 | "url": "https:\/\/showtheway.io\/oembed", 1369 | "discovery": true 1370 | } 1371 | ] 1372 | }, 1373 | { 1374 | "provider_name": "Silk", 1375 | "provider_url": "http:\/\/www.silk.co\/", 1376 | "endpoints": [ 1377 | { 1378 | "schemes": [ 1379 | "http:\/\/*.silk.co\/explore\/*", 1380 | "https:\/\/*.silk.co\/explore\/*", 1381 | "http:\/\/*.silk.co\/s\/embed\/*", 1382 | "https:\/\/*.silk.co\/s\/embed\/*" 1383 | ], 1384 | "url": "http:\/\/www.silk.co\/oembed\/", 1385 | "discovery": true 1386 | } 1387 | ] 1388 | }, 1389 | { 1390 | "provider_name": "Sizzle", 1391 | "provider_url": "https:\/\/onsizzle.com\/", 1392 | "endpoints": [ 1393 | { 1394 | "schemes": [ 1395 | "https:\/\/onsizzle.com\/i\/*" 1396 | ], 1397 | "url": "https:\/\/onsizzle.com\/oembed", 1398 | "discovery": true 1399 | } 1400 | ] 1401 | }, 1402 | { 1403 | "provider_name": "Sketchfab", 1404 | "provider_url": "http:\/\/sketchfab.com", 1405 | "endpoints": [ 1406 | { 1407 | "schemes": [ 1408 | "http:\/\/sketchfab.com\/models\/*", 1409 | "https:\/\/sketchfab.com\/models\/*", 1410 | "https:\/\/sketchfab.com\/*\/folders\/*" 1411 | ], 1412 | "url": "http:\/\/sketchfab.com\/oembed", 1413 | "formats": [ 1414 | "json" 1415 | ] 1416 | } 1417 | ] 1418 | }, 1419 | { 1420 | "provider_name": "SlideShare", 1421 | "provider_url": "http:\/\/www.slideshare.net\/", 1422 | "endpoints": [ 1423 | { 1424 | "schemes": [ 1425 | "http:\/\/www.slideshare.net\/*\/*", 1426 | "http:\/\/fr.slideshare.net\/*\/*", 1427 | "http:\/\/de.slideshare.net\/*\/*", 1428 | "http:\/\/es.slideshare.net\/*\/*", 1429 | "http:\/\/pt.slideshare.net\/*\/*" 1430 | ], 1431 | "url": "http:\/\/www.slideshare.net\/api\/oembed\/2", 1432 | "discovery": true 1433 | } 1434 | ] 1435 | }, 1436 | { 1437 | "provider_name": "SmugMug", 1438 | "provider_url": "http:\/\/www.smugmug.com\/", 1439 | "endpoints": [ 1440 | { 1441 | "schemes": [ 1442 | "http:\/\/*.smugmug.com\/*" 1443 | ], 1444 | "url": "http:\/\/api.smugmug.com\/services\/oembed\/", 1445 | "discovery": true 1446 | } 1447 | ] 1448 | }, 1449 | { 1450 | "provider_name": "SoundCloud", 1451 | "provider_url": "http:\/\/soundcloud.com\/", 1452 | "endpoints": [ 1453 | { 1454 | "schemes": [ 1455 | "http:\/\/soundcloud.com\/*" 1456 | ], 1457 | "url": "https:\/\/soundcloud.com\/oembed" 1458 | } 1459 | ] 1460 | }, 1461 | { 1462 | "provider_name": "Soundsgood", 1463 | "provider_url": "https:\/\/soundsgood.co", 1464 | "endpoints": [ 1465 | { 1466 | "schemes": [ 1467 | "https:\/\/play.soundsgood.co\/playlist\/*", 1468 | "https:\/\/soundsgood.co\/playlist\/*" 1469 | ], 1470 | "url": "https:\/\/play.soundsgood.co\/oembed", 1471 | "discovery": true, 1472 | "formats": [ 1473 | "json", 1474 | "xml" 1475 | ] 1476 | } 1477 | ] 1478 | }, 1479 | { 1480 | "provider_name": "SpeakerDeck", 1481 | "provider_url": "https:\/\/speakerdeck.com", 1482 | "endpoints": [ 1483 | { 1484 | "schemes": [ 1485 | "http:\/\/speakerdeck.com\/*\/*", 1486 | "https:\/\/speakerdeck.com\/*\/*" 1487 | ], 1488 | "url": "https:\/\/speakerdeck.com\/oembed.json", 1489 | "discovery": true, 1490 | "formats": [ 1491 | "json" 1492 | ] 1493 | } 1494 | ] 1495 | }, 1496 | { 1497 | "provider_name": "Spreaker", 1498 | "provider_url": "https:\/\/www.spreaker.com\/", 1499 | "endpoints": [ 1500 | { 1501 | "schemes": [ 1502 | "http:\/\/*.spreaker.com\/*", 1503 | "https:\/\/*.spreaker.com\/*" 1504 | ], 1505 | "url": "https:\/\/api.spreaker.com\/oembed", 1506 | "discovery": true 1507 | } 1508 | ] 1509 | }, 1510 | { 1511 | "provider_name": "Streamable", 1512 | "provider_url": "https:\/\/streamable.com\/", 1513 | "endpoints": [ 1514 | { 1515 | "schemes": [ 1516 | "http:\/\/streamable.com\/*", 1517 | "https:\/\/streamable.com\/*" 1518 | ], 1519 | "url": "https:\/\/api.streamable.com\/oembed.json", 1520 | "discovery": true 1521 | } 1522 | ] 1523 | }, 1524 | { 1525 | "provider_name": "StreamOneCloud", 1526 | "provider_url": "https:\/\/www.streamone.nl", 1527 | "endpoints": [ 1528 | { 1529 | "schemes": [ 1530 | "https:\/\/content.streamonecloud.net\/embed\/*" 1531 | ], 1532 | "url": "https:\/\/content.streamonecloud.net\/oembed", 1533 | "discovery": true 1534 | } 1535 | ] 1536 | }, 1537 | { 1538 | "provider_name": "Sway", 1539 | "provider_url": "https:\/\/www.sway.com", 1540 | "endpoints": [ 1541 | { 1542 | "schemes": [ 1543 | "https:\/\/sway.com\/*", 1544 | "https:\/\/www.sway.com\/*" 1545 | ], 1546 | "url": "https:\/\/sway.com\/api\/v1.0\/oembed", 1547 | "discovery": true 1548 | } 1549 | ] 1550 | }, 1551 | { 1552 | "provider_name": "Ted", 1553 | "provider_url": "http:\/\/ted.com", 1554 | "endpoints": [ 1555 | { 1556 | "schemes": [ 1557 | "http:\/\/ted.com\/talks\/*" 1558 | ], 1559 | "url": "http:\/\/www.ted.com\/talks\/oembed.{format}" 1560 | } 1561 | ] 1562 | }, 1563 | { 1564 | "provider_name": "The New York Times", 1565 | "provider_url": "https:\/\/www.nytimes.com", 1566 | "endpoints": [ 1567 | { 1568 | "schemes": [ 1569 | "https:\/\/www.nytimes.com\/svc\/oembed", 1570 | "https:\/\/nytimes.com\/*", 1571 | "https:\/\/*.nytimes.com\/*" 1572 | ], 1573 | "url": "https:\/\/www.nytimes.com\/svc\/oembed\/json\/", 1574 | "discovery": true 1575 | } 1576 | ] 1577 | }, 1578 | { 1579 | "provider_name": "They Said So", 1580 | "provider_url": "https:\/\/theysaidso.com\/", 1581 | "endpoints": [ 1582 | { 1583 | "schemes": [ 1584 | "https:\/\/theysaidso.com\/image\/*" 1585 | ], 1586 | "url": "https:\/\/theysaidso.com\/extensions\/oembed\/", 1587 | "discovery": true 1588 | } 1589 | ] 1590 | }, 1591 | { 1592 | "provider_name": "TickCounter", 1593 | "provider_url": "https:\/\/www.tickcounter.com", 1594 | "endpoints": [ 1595 | { 1596 | "schemes": [ 1597 | "http:\/\/www.tickcounter.com\/countdown\/*", 1598 | "http:\/\/www.tickcounter.com\/countup\/*", 1599 | "http:\/\/www.tickcounter.com\/ticker\/*", 1600 | "http:\/\/www.tickcounter.com\/worldclock\/*", 1601 | "https:\/\/www.tickcounter.com\/countdown\/*", 1602 | "https:\/\/www.tickcounter.com\/countup\/*", 1603 | "https:\/\/www.tickcounter.com\/ticker\/*", 1604 | "https:\/\/www.tickcounter.com\/worldclock\/*" 1605 | ], 1606 | "url": "https:\/\/www.tickcounter.com\/oembed", 1607 | "discovery": true 1608 | } 1609 | ] 1610 | }, 1611 | { 1612 | "provider_name": "Topy", 1613 | "provider_url": "http:\/\/www.topy.se\/", 1614 | "endpoints": [ 1615 | { 1616 | "schemes": [ 1617 | "http:\/\/www.topy.se\/image\/*" 1618 | ], 1619 | "url": "http:\/\/www.topy.se\/oembed\/", 1620 | "discovery": true 1621 | } 1622 | ] 1623 | }, 1624 | { 1625 | "provider_name": "Twitch", 1626 | "provider_url": "https:\/\/www.twitch.tv", 1627 | "endpoints": [ 1628 | { 1629 | "schemes": [ 1630 | "http:\/\/clips.twitch.tv\/*", 1631 | "https:\/\/clips.twitch.tv\/*", 1632 | "http:\/\/www.twitch.tv\/*", 1633 | "https:\/\/www.twitch.tv\/*", 1634 | "http:\/\/twitch.tv\/*", 1635 | "https:\/\/twitch.tv\/*" 1636 | ], 1637 | "url": "https:\/\/api.twitch.tv\/v4\/oembed", 1638 | "formats": [ 1639 | "json" 1640 | ] 1641 | } 1642 | ] 1643 | }, 1644 | { 1645 | "provider_name": "Twitter", 1646 | "provider_url": "http:\/\/www.twitter.com\/", 1647 | "endpoints": [ 1648 | { 1649 | "schemes": [ 1650 | "https:\/\/twitter.com\/*\/status\/*" 1651 | ], 1652 | "url": "https:\/\/publish.twitter.com\/oembed" 1653 | } 1654 | ] 1655 | }, 1656 | { 1657 | "provider_name": "Ubideo", 1658 | "provider_url": "https:\/\/player.ubideo.com\/", 1659 | "endpoints": [ 1660 | { 1661 | "schemes": [ 1662 | "https:\/\/player.ubideo.com\/*" 1663 | ], 1664 | "url": "https:\/\/player.ubideo.com\/api\/oembed.json", 1665 | "formats": [ 1666 | "json" 1667 | ] 1668 | } 1669 | ] 1670 | }, 1671 | { 1672 | "provider_name": "UOL", 1673 | "provider_url": "https:\/\/mais.uol.com.br\/", 1674 | "endpoints": [ 1675 | { 1676 | "schemes": [ 1677 | "https:\/\/*.uol.com.br\/view\/*", 1678 | "https:\/\/*.uol.com.br\/video\/*" 1679 | ], 1680 | "url": "https:\/\/mais.uol.com.br\/apiuol\/v3\/oembed\/view", 1681 | "discovery": true 1682 | } 1683 | ] 1684 | }, 1685 | { 1686 | "provider_name": "Ustream", 1687 | "provider_url": "http:\/\/www.ustream.tv", 1688 | "endpoints": [ 1689 | { 1690 | "schemes": [ 1691 | "http:\/\/*.ustream.tv\/*", 1692 | "http:\/\/*.ustream.com\/*" 1693 | ], 1694 | "url": "http:\/\/www.ustream.tv\/oembed", 1695 | "formats": [ 1696 | "json" 1697 | ] 1698 | } 1699 | ] 1700 | }, 1701 | { 1702 | "provider_name": "Uttles", 1703 | "provider_url": "http:\/\/uttles.com", 1704 | "endpoints": [ 1705 | { 1706 | "schemes": [ 1707 | "http:\/\/uttles.com\/uttle\/*" 1708 | ], 1709 | "url": "http:\/\/uttles.com\/api\/reply\/oembed", 1710 | "discovery": true 1711 | } 1712 | ] 1713 | }, 1714 | { 1715 | "provider_name": "VeeR VR", 1716 | "provider_url": "http:\/\/veer.tv\/", 1717 | "endpoints": [ 1718 | { 1719 | "schemes": [ 1720 | "http:\/\/veer.tv\/videos\/*" 1721 | ], 1722 | "url": "https:\/\/api.veer.tv\/oembed", 1723 | "discovery": true 1724 | }, 1725 | { 1726 | "schemes": [ 1727 | "http:\/\/veervr.tv\/videos\/*" 1728 | ], 1729 | "url": "https:\/\/api.veervr.tv\/oembed", 1730 | "discovery": true 1731 | } 1732 | ] 1733 | }, 1734 | { 1735 | "provider_name": "Verse", 1736 | "provider_url": "http:\/\/verse.media\/", 1737 | "endpoints": [ 1738 | { 1739 | "url": "http:\/\/verse.media\/services\/oembed\/" 1740 | } 1741 | ] 1742 | }, 1743 | { 1744 | "provider_name": "VEVO", 1745 | "provider_url": "http:\/\/www.vevo.com\/", 1746 | "endpoints": [ 1747 | { 1748 | "schemes": [ 1749 | "http:\/\/www.vevo.com\/*", 1750 | "https:\/\/www.vevo.com\/*" 1751 | ], 1752 | "url": "https:\/\/www.vevo.com\/oembed", 1753 | "discovery": false 1754 | } 1755 | ] 1756 | }, 1757 | { 1758 | "provider_name": "VideoJug", 1759 | "provider_url": "http:\/\/www.videojug.com", 1760 | "endpoints": [ 1761 | { 1762 | "schemes": [ 1763 | "http:\/\/www.videojug.com\/film\/*", 1764 | "http:\/\/www.videojug.com\/interview\/*" 1765 | ], 1766 | "url": "http:\/\/www.videojug.com\/oembed.{format}" 1767 | } 1768 | ] 1769 | }, 1770 | { 1771 | "provider_name": "Vidlit", 1772 | "provider_url": "https:\/\/vidl.it\/", 1773 | "endpoints": [ 1774 | { 1775 | "schemes": [ 1776 | "https:\/\/vidl.it\/*" 1777 | ], 1778 | "url": "https:\/\/api.vidl.it\/oembed", 1779 | "discovery": true 1780 | } 1781 | ] 1782 | }, 1783 | { 1784 | "provider_name": "Vimeo", 1785 | "provider_url": "https:\/\/vimeo.com\/", 1786 | "endpoints": [ 1787 | { 1788 | "schemes": [ 1789 | "https:\/\/vimeo.com\/*", 1790 | "https:\/\/vimeo.com\/album\/*\/video\/*", 1791 | "https:\/\/vimeo.com\/channels\/*\/*", 1792 | "https:\/\/vimeo.com\/groups\/*\/videos\/*", 1793 | "https:\/\/vimeo.com\/ondemand\/*\/*", 1794 | "https:\/\/player.vimeo.com\/video\/*" 1795 | ], 1796 | "url": "https:\/\/vimeo.com\/api\/oembed.{format}", 1797 | "discovery": true 1798 | } 1799 | ] 1800 | }, 1801 | { 1802 | "provider_name": "Vine", 1803 | "provider_url": "https:\/\/vine.co\/", 1804 | "endpoints": [ 1805 | { 1806 | "schemes": [ 1807 | "http:\/\/vine.co\/v\/*", 1808 | "https:\/\/vine.co\/v\/*" 1809 | ], 1810 | "url": "https:\/\/vine.co\/oembed.json", 1811 | "discovery": true 1812 | } 1813 | ] 1814 | }, 1815 | { 1816 | "provider_name": "Vlipsy", 1817 | "provider_url": "https:\/\/vlipsy.com\/", 1818 | "endpoints": [ 1819 | { 1820 | "schemes": [ 1821 | "https:\/\/vlipsy.com\/*" 1822 | ], 1823 | "url": "https:\/\/vlipsy.com\/oembed", 1824 | "discovery": true 1825 | } 1826 | ] 1827 | }, 1828 | { 1829 | "provider_name": "Wiredrive", 1830 | "provider_url": "https:\/\/www.wiredrive.com\/", 1831 | "endpoints": [ 1832 | { 1833 | "schemes": [ 1834 | "https:\/\/*.wiredrive.com\/*" 1835 | ], 1836 | "url": "http:\/\/*.wiredrive.com\/present-oembed\/", 1837 | "formats": [ 1838 | "json" 1839 | ], 1840 | "discovery": true 1841 | } 1842 | ] 1843 | }, 1844 | { 1845 | "provider_name": "wizer.me", 1846 | "provider_url": "http:\/\/www.wizer.me\/", 1847 | "endpoints": [ 1848 | { 1849 | "schemes": [ 1850 | "http:\/\/*.wizer.me\/learn\/*", 1851 | "https:\/\/*.wizer.me\/learn\/*", 1852 | "http:\/\/*.wizer.me\/preview\/*", 1853 | "https:\/\/*.wizer.me\/preview\/*" 1854 | ], 1855 | "url": "http:\/\/app.wizer.me\/api\/oembed.{format}", 1856 | "discovery": true 1857 | } 1858 | ] 1859 | }, 1860 | { 1861 | "provider_name": "Wootled", 1862 | "provider_url": "http:\/\/www.wootled.com\/", 1863 | "endpoints": [ 1864 | { 1865 | "url": "http:\/\/www.wootled.com\/oembed" 1866 | } 1867 | ] 1868 | }, 1869 | { 1870 | "provider_name": "WordPress.com", 1871 | "provider_url": "http:\/\/wordpress.com\/", 1872 | "endpoints": [ 1873 | { 1874 | "url": "http:\/\/public-api.wordpress.com\/oembed\/", 1875 | "discovery": true 1876 | } 1877 | ] 1878 | }, 1879 | { 1880 | "provider_name": "YFrog", 1881 | "provider_url": "http:\/\/yfrog.com\/", 1882 | "endpoints": [ 1883 | { 1884 | "schemes": [ 1885 | "http:\/\/*.yfrog.com\/*", 1886 | "http:\/\/yfrog.us\/*" 1887 | ], 1888 | "url": "http:\/\/www.yfrog.com\/api\/oembed", 1889 | "formats": [ 1890 | "json" 1891 | ] 1892 | } 1893 | ] 1894 | }, 1895 | { 1896 | "provider_name": "YouTube", 1897 | "provider_url": "http:\/\/www.youtube.com\/", 1898 | "endpoints": [ 1899 | { 1900 | "url": "http:\/\/www.youtube.com\/oembed", 1901 | "discovery": true 1902 | } 1903 | ] 1904 | } 1905 | ] 1906 | -------------------------------------------------------------------------------- /server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "flag" 6 | "fmt" 7 | "io/ioutil" 8 | "log" 9 | "net" 10 | "net/http" 11 | "net/url" 12 | "strings" 13 | "time" 14 | 15 | "github.com/dyatlov/go-oembed/oembed" 16 | "github.com/dyatlov/go-url2oembed/url2oembed" 17 | ) 18 | 19 | type workerData struct { 20 | Status int 21 | Data string 22 | } 23 | 24 | type job struct { 25 | Url string 26 | Result chan workerData 27 | } 28 | 29 | type apiHandler struct { 30 | } 31 | 32 | func (h *apiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 33 | r.ParseForm() 34 | u := r.FormValue("url") 35 | 36 | w.Header().Set("Server", "ProcLink") 37 | w.Header().Set("Content-Type", "application/json") 38 | 39 | // to be able to retrieve data from javascript directly 40 | w.Header().Set("Access-Control-Allow-Origin", "*") 41 | w.Header().Set("Access-Control-Allow-Methods", "GET") 42 | 43 | _, err := url.Parse(u) 44 | 45 | if err != nil { 46 | log.Printf("Invalid URL provided: %s", u) 47 | http.Error(w, "{\"status\": \"error\", \"message\":\"Invalid URL\"}", 500) 48 | return 49 | } 50 | 51 | log.Printf("Sending job: %s", u) 52 | 53 | c := make(chan workerData) 54 | jobPool <- job{Url: u, Result: c} 55 | data := <-c 56 | 57 | w.WriteHeader(data.Status) 58 | fmt.Fprintln(w, data.Data) 59 | } 60 | 61 | // This is where the work actually happens 62 | func worker(parser *url2oembed.Parser, jobs <-chan job) { 63 | for { 64 | params := <-jobs 65 | u := strings.Trim(params.Url, "\r\n") 66 | 67 | log.Printf("Got url: %s", u) 68 | 69 | info := parser.Parse(u) 70 | 71 | if info == nil { 72 | log.Printf("No info for url: %s", u) 73 | params.Result <- workerData{Status: 404, Data: "{\"status\": \"error\", \"message\":\"Unable to retrieve information from provided url\"}"} 74 | } else if info.Status < 300 { 75 | log.Printf("Url parsed: %s", u) 76 | params.Result <- workerData{Status: 200, Data: info.String()} 77 | } else { 78 | log.Printf("Something weird: %s", u) 79 | params.Result <- workerData{Status: 411, Data: fmt.Sprintf("{\"status\": \"error\", \"message\":\"Unable to obtain data. Status code: %d\"}", info.Status)} 80 | } 81 | } 82 | } 83 | 84 | var jobPool chan job 85 | 86 | // stringsToNetworks converts arrays of string representation of IP ranges into []*net.IPnet slice 87 | func stringsToNetworks(ss []string) ([]*net.IPNet, error) { 88 | var result []*net.IPNet 89 | for _, s := range ss { 90 | _, network, err := net.ParseCIDR(s) 91 | if err != nil { 92 | return nil, err 93 | } 94 | result = append(result, network) 95 | } 96 | 97 | return result, nil 98 | } 99 | 100 | func main() { 101 | providersFile := flag.String("providers_file", "providers.json", "Path to oembed providers json file") 102 | workerCount := flag.Int("worker_count", 1000, "Amount of workers to start") 103 | host := flag.String("host", "localhost", "Host to listen on") 104 | port := flag.Int("port", 8000, "Port to listen on") 105 | maxHTMLBytesToRead := flag.Int64("html_bytes_to_read", 50000, "How much data to read from URL if it's an html page") 106 | maxBinaryBytesToRead := flag.Int64("binary_bytes_to_read", 4096, "How much data to read from URL if it's NOT an html page") 107 | waitTimeout := flag.Int("wait_timeout", 7, "How much time to wait for/fetch response from remote server") 108 | whiteListRanges := flag.String("whitelist_ranges", "", "What IP ranges to allow. Example: 178.25.32.1/8") 109 | blackListRanges := flag.String("blacklist_ranges", "", "What IP ranges to disallow. Example: 178.25.32.1/8") 110 | 111 | flag.Parse() 112 | 113 | buf, err := ioutil.ReadFile(*providersFile) 114 | 115 | if err != nil { 116 | panic(err) 117 | } 118 | 119 | var whiteListNetworks []*net.IPNet 120 | if len(*whiteListRanges) > 0 { 121 | if whiteListNetworks, err = stringsToNetworks(strings.Split(*whiteListRanges, " ")); err != nil { 122 | panic(err) 123 | } 124 | } 125 | 126 | var blackListNetworks []*net.IPNet 127 | if len(*blackListRanges) > 0 { 128 | if blackListNetworks, err = stringsToNetworks(strings.Split(*blackListRanges, " ")); err != nil { 129 | panic(err) 130 | } 131 | } 132 | 133 | oe := oembed.NewOembed() 134 | oe.ParseProviders(bytes.NewReader(buf)) 135 | 136 | log.Println("Starting workers:", *workerCount) 137 | 138 | jobPool = make(chan job) 139 | for i := 0; i < *workerCount; i++ { 140 | p := url2oembed.NewParser(oe) 141 | p.MaxHTMLBodySize = *maxHTMLBytesToRead 142 | p.MaxBinaryBodySize = *maxBinaryBytesToRead 143 | p.WaitTimeout = time.Duration(*waitTimeout) * time.Second 144 | p.BlacklistedIPNetworks = blackListNetworks 145 | p.WhitelistedIPNetworks = whiteListNetworks 146 | go worker(p, jobPool) 147 | } 148 | 149 | log.Println("All workers started. Starting server on port", *port) 150 | 151 | startServer(*host, *port, *waitTimeout) 152 | } 153 | 154 | func startServer(host string, port int, waitTimeout int) { 155 | s := &http.Server{ 156 | Addr: fmt.Sprintf("%s:%d", host, port), 157 | Handler: &apiHandler{}, 158 | ReadTimeout: time.Duration(waitTimeout) * time.Second, 159 | WriteTimeout: time.Duration(waitTimeout) * time.Second, 160 | MaxHeaderBytes: 1 << 20, 161 | } 162 | 163 | log.Fatal(s.ListenAndServe()) 164 | } 165 | --------------------------------------------------------------------------------