consumet / api.consumet.org

A Modern Search Engine API for Anime, Movies/TVShows, Books, Light Novels, Manga, etc.
https://docs.consumet.org
GNU General Public License v3.0
1.18k stars 540 forks source link

I am getting cors policy error #641

Open saimahendra282 opened 1 week ago

saimahendra282 commented 1 week ago

Access to XMLHttpRequest at 'https://www115.anzeat.pro/streamhls/a3407edcf6647e3067c47f54a3eb87ad/ep.7.1731940264.m3u8' from origin 'https://.......' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://s3embtaku.pro' that is not equal to the supplied origin. www115.anzeat.pro/streamhls/a3407edcf6647e3067c47f54a3eb87ad/ep.7.1731940264.m3u8:1

   Failed to load resource: net::ERR_FAILED 

haigakura-episode-7:1 Access to XMLHttpRequest at 'https://www115.anzeat.pro/streamhls/a3407edcf6647e3067c47f54a3eb87ad/ep.7.1731940264.m3u8' from origin 'https:.........' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://s3embtaku.pro' that is not equal to the supplied origin. xhr-loader.ts:134

   GET https://www115.anzeat.pro/streamhls/a3407edcf6647e3067c47f54a3eb87ad/ep.7.1731940264.m3u8 net::ERR_FAILED 200 (OK)

e.loadInternal @ xhr-loader.ts:134 setTimeout e.readystatechange @ xhr-loader.ts:220 can anyone help me with this

NOOB-3301 commented 1 week ago

I am getting same. I tried it many ways. When I used postman with referer header it gives .ts segmented value and in the devtools it is showing set referer header denied.

I made a project a few days back back then it does not require this header.

Gogoanime probably blocked adding this header idk maybe 🥲 If any fix let me know

notbeer commented 1 week ago

The issue can be fixed with a proxy. Here's a proxy that works for gogoanime m3u8: https://github.com/JulzOhern/GOGOANIME-PROXY

NOOB-3301 commented 1 week ago

The issue can be fixed with a proxy. Here's a proxy that works for gogoanime m3u8: https://github.com/JulzOhern/GOGOANIME-PROXY

How I can use this. Give me a general overview, like which url i have to send 'www.aznet...' and which end point.

In consumet utils folder there is m3u8 proxy that also give cors issue.

Help me out

notbeer commented 1 week ago

The issue can be fixed with a proxy. Here's a proxy that works for gogoanime m3u8: https://github.com/JulzOhern/GOGOANIME-PROXY

How I can use this. Give me a general overview, like which url i have to send 'www.aznet...' and which end point.

In consumet utils folder there is m3u8 proxy that also give cors issue.

Help me out

/hls-proxy?url=https://your-m3u8-link

Make sure to set BASE_URL in .env file either as http://localhost:port. Or in deployment set environment variable as your proxy domain

NOOB-3301 commented 1 week ago

The issue can be fixed with a proxy. Here's a proxy that works for gogoanime m3u8: https://github.com/JulzOhern/GOGOANIME-PROXY

How I can use this. Give me a general overview, like which url i have to send 'www.aznet...' and which end point. In consumet utils folder there is m3u8 proxy that also give cors issue. Help me out

/hls-proxy?url=https://your-m3u8-link

Make sure to set BASE_URL in .env file either as http://localhost:port. Or in deployment set environment variable as your proxy domain

you have discord or some thing ....