Web developer. Lead developer of PieFed

  • 81 Posts
  • 477 Comments
Joined 1 year 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 -->
    
    
    






  • Yesterday I merged in a PR that lets the instance admin set the sizes for thumbnails.

    But the real issue is that the thumbnails have a variety of uses - in the PieFed web UI thumbnails are shown quite small so 170px is fine. But some mobile apps might show the thumbnail in a manner that spans the whole screen which is going to need to be at least 350px wide.

    I’ll make PieFed generate a 500px version of the thumbnail and include that in the API response (as well as the smaller one).