Web developer. Lead developer of PieFed

  • 160 Posts
  • 1.1K Comments
Joined 2 years ago
cake
Cake day: January 4th, 2024

help-circle











  • Jerry your Cloudflare is getting in the way. When I go to feddit.online and run this JS in my browser dev tools I get a 403 and a bunch of gibberish from Cloudflare in my console:

    fetch('/api/alpha/user/login', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        username: 'testuser',
        password: 'secretpassword'
      })
    })
      .then(response => response.text())
      .then(text => {
        console.log('Raw response:', text);
        try {
          const json = JSON.parse(text);
          console.log('Parsed JSON:', json);
        } catch (err) {
          console.error('Failed to parse JSON:', err);
        }
      })
      .catch(error => console.error('Fetch error:', error));
    
    
    
    <div class="cf-section cf-wrapper">
            <div class="cf-columns two">
              <div class="cf-column">
                <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>
    
                <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>
              </div>
    
              <div class="cf-column">
                <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>
    
                <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>
              </div>
            </div>
          </div><!-- /.section -->