dice.camp is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon server for RPG folks to hang out and talk. Not owned by a billionaire.

Administered by:

Server stats:

1.7K
active users

#cors

0 posts0 participants0 posts today

Been using #Vivaldi lately, largely because the #ZenBrowser has a problem with handling #CORS on #Angular apps, like #YouTube, meaning it fails to load videos.

The Zen team is ofc over taxed and has a lot of things to do, I've been told - even though that just sounds like another "only I can drive" problem that requires recruitment.

In any case, it functions as expected - being a #Chrome based browser - but it's proprietary nature is still dubious to me - as in it's privacy is questionable.

🚨 Help Needed: #CORS and #Cloudflare Access Issues with #Nextflux + #MiniFlux Setup 🚨

Hi everyone! I’m struggling with a #SelfHosted setup and could really use some advice from the self-hosting community. Lol I've been trying to figure this out for hours with no luck. Here’s my situation:

Setup

  • MiniFlux: Running in #Docker on a #RaspberryPi500 (#Stormux, based on #ArchLinuxARM).
  • Nextflux: Hosted on Cloudflare Pages.
  • Reverse Proxy: #Caddy (installed via AUR).
  • Cloudflare Access: Enabled for security and SSO.
  • Cloudflared: Also installed via AUR.
  • CORS Settings in Cloudflare Access: Configured to allow all origins, methods, and headers.

What’s Working

  • MiniFlux is accessible from my home network after removing restrictive CORS settings in both Caddy and MiniFlux.
  • Nextflux is properly deployed on Cloudflare Pages.

The Problem

Nextflux cannot connect to MiniFlux due to persistent CORS errors and authentication issues with Cloudflare Access. Here are the errors I’m seeing in the browser console:

  1. CORS Error:Access to fetch at 'https://rss.laniecarmelo.tech/v1/me' from origin 'https://nextflux.laniecarmelo.tech' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  2. Cloudflare Access Redirection:

    Request redirected to 'https://lifeofararebird.cloudflareaccess.com/cdn-cgi/access/login/rss.laniecarmelo.tech'.
  3. Failed to Fetch:

    Failed to fetch: TypeError: Failed to fetch.

What I’ve Tried

  1. Service Token Authentication:

    • Generated a service token in Cloudflare Access for Nextflux.
    • Added CF-Access-Client-Id and CF-Access-Client-Secret headers in Caddy for rss.laniecarmelo.tech.
    • Updated Cloudflare Access policies to include a bypass rule for this service token.
  2. CORS Configuration:

    • Tried permissive settings (Access-Control-Allow-Origin: *) in both Caddy and MiniFlux.
    • Configured Cloudflare Access CORS settings to allow all origins, methods, and headers.
  3. Policy Adjustments:

    • Created a bypass policy for my home IP range and public IP.
    • Added an "Allow" policy for authenticated users via email/login methods.
  4. Debugging Logs:

    • Checked Cloudflared logs, which show requests being blocked due to missing access tokens (AccessJWTValidator errors).

Current State

Despite these efforts:

  • Requests from Nextflux are still being blocked by Cloudflare Access or failing due to CORS issues.
  • The browser console consistently shows "No 'Access-Control-Allow-Origin' header" errors.

Goals

  1. Allow Nextflux (hosted on Cloudflare Pages) to connect seamlessly to MiniFlux (behind Cloudflare Access).
  2. Maintain secure access to MiniFlux for other devices (e.g., my home network or mobile devices).

My Environment

  • Raspberry Pi 500 running Arch Linux ARM.
  • Both Caddy and Cloudflared are installed via AUR packages.
  • MiniFlux is running in Docker with the following environment variables:CLOUDFLARE_SERVICE_AUTH_ENABLED=trueCLOUDFLARE_CLIENT_ID=<client-id>CLOUDFLARE_CLIENT_SECRET=<client-secret>

Relevant Logs

From cloudflared:

ERR error="request filtered by middleware handler (AccessJWTValidator) due to: no access token in request"

From the browser console:

Access to fetch at 'https://rss.laniecarmelo.tech/v1/me' has been blocked by CORS policy.

Questions

  1. Is there a better way to configure CORS for this setup?
  2. Should I be handling authentication differently between Nextflux and MiniFlux?
  3. How can I ensure that requests from Nextflux include valid access tokens?

Any help or advice would be greatly appreciated! 🙏

Web Scraping with your Web Browser: Why Not?

Link
📌 Summary: 本文探討在網頁瀏覽器中進行網頁爬蟲的可能性,否認了傳統上僅依賴Python和Beautiful Soup的做法。作者指出,雖然一些擴展工具聲稱能無需編碼進行爬蟲,但這僅限於簡單網站。從歷史上看,JavaScript的發展使其在網頁爬蟲的應用上進展緩慢。文章詳細介紹了如何處理CORS問題、代理伺服器的使用及簡單範例,並引導讀者以幾行代碼建立自己的爬蟲。最終,作者提到瀏覽器在檢索數據方面的優勢並提出繼續開發本地代理伺服器的建議。

🎯 Key Points:
- 網頁爬蟲普遍使用Python,JavaScript的應用較少。
- CORS(跨來源資源共享)對JavaScript的存取有影響,解決方案包括使用代理伺服器。
- 使用本地代理伺服器進行更複雜的爬蟲工作更為有效。
- 提供了一個簡單的爬蟲範例,可用瀏覽器直接運行。
- 強調無需繁瑣的第三方工具,即可在瀏覽器中實現網頁數據抓取。

🔖 Keywords: #網頁爬蟲 #JavaScript #CORS #代理伺服器 #數據擷取
8chananon.github.ioWeb Scraping with your Web Browser: Why Not?
Continued thread

Ok I guess I'll have to give up again quite quickly 😦

#Microsoft #Teams is broken for me as soon as I disable #IPv4. From what I could understand in this horrible mess of a "web app", the reason is probably some #CORS error. I have no idea how that could ever be related to #IPv6 or #NAT or anything. Tried temporarily disabling #NAT64 (to force direct v6 connections), tried adding all of Microsofts v6 networks to the "exclude" option of bind9 to have everything pass #NAT64 *avoiding* native IPv6, tried several ways to disable CORS, nothing helped. 🤬

Anyone know about these issues with teams?

edit: to clarify, "everything" seems to work except for the main purpose: join an actual call ...

🚨 CORS error blocking your Laravel API? 🚨

If your frontend and Laravel backend are on different domains, you’ve probably hit the dreaded CORS policy error.
Don’t let it break your app! Learn how to configure your Laravel application to allow cross-origin requests, and get your API running smoothly.

🔧 Fix it now: dev.to/robertobutti/resolve-bl

DEV CommunityResolve "Blocked by CORS Policy: No 'Access-Control-Allow-Origin'" in LaravelIf your frontend and Laravel backend are on different domains, you’ve probably hit the dreaded CORS...
#cors#php#laravel

🔓CORS is Stupid - Kevin Cox
— Kevin Cox

「 First and foremost CORS is a giant hack to mitigate legacy mistakes. It provides both opt-out protections as an attempt to mitigate XSS attacks against unaware or unmodified sites and opt-in protections for sites to actively protect themselves. But none of these protections are actually sufficient to solve the intended problem 」

kevincox.ca/2024/08/24/cors/

kevincox.caCORS is Stupid - Kevin Cox