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

CORS settings for IIS 10 #1579

Closed
froduit opened this issue Feb 5, 2019 · 1 comment
Closed

CORS settings for IIS 10 #1579

froduit opened this issue Feb 5, 2019 · 1 comment

Comments

@froduit
Copy link

@froduit froduit commented Feb 5, 2019

What version of WebTorrent?
Last version from Webtorrent CDN
What operating system and Node.js version?
Windows Server 2016 (IIS 10)
What browser and version? (if using WebTorrent in the browser)
Firefox, Safari, Chrome and Edge
What did you expect to happen?
Expected to stream a .mp4 video within html5 player ; Video only loads on google chrome.
What actually happened?
I suspect a server misconfiguration for the cross origin resource sharing. The video plays after a couple of seconds on chrome, but will load forever with Firefox, Safari or Microsoft Edge. No error is displayed in the console though.

Right now the Range, Content-Type headers are allowed, the GET, POST, HEAD, OPTIONS methods, and everything (*) for the Access-Control-Allow-Origin.
The web.config file which enable CORS on IIS 10 looks like this :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <cors enabled="true">
        <add origin="https://webtorrent.io" allowCredentials="true" maxAge="600">
        </add>
        </cors>
        <httpProtocol>
            <customHeaders>
                <add name="Access-Control-Allow-Headers" value="Range, Content-Type" />
                <add name="Access-Control-Allow-Methods" value="GET, POST, HEAD, OPTIONS" />
            </customHeaders>
        </httpProtocol>
        <directoryBrowse enabled="false" />
    </system.webServer>
</configuration>

I don't know what I am missing. I use a webseed (ws) and exact seed (xs), and once the video has begun on chrome, I am able to also play it on firefox !

This is not a webtorrent issue it's mine and I am not an expert. But please, can you help me to sort this out for IIS 10 ?

Regards,

@froduit froduit closed this Feb 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 14, 2019
@webtorrent webtorrent unlocked this conversation Sep 5, 2019
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Sep 5, 2019

You might want to try using the version of webtorrent hosted on the latest jsdelivr URL: https://cdn.jsdelivr.net/npm/webtorrent@latest/webtorrent.min.js

There is another deprecated URL that no longer updates and is stuck on 0.98.18 of WebTorrent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.