Coder Social home page Coder Social logo

Comments (9)

jgmize avatar jgmize commented on July 28, 2024

I was able to trace down the error to the fact that the media uploader uses flash, which does not support basic http auth. When I temporarily disabled the basic auth, I was able to upload a file to the dev server in the test directory without issues.

from fxoss.

bensternthal avatar bensternthal commented on July 28, 2024

Ah shit!

from fxoss.

bensternthal avatar bensternthal commented on July 28, 2024

Now that I am done swearing.

What are our options here?

from fxoss.

jgmize avatar jgmize commented on July 28, 2024
  1. disable basic auth in nginx and only use django authentication for the site.
  2. disable the flash uploader and upload the files using another method.

from fxoss.

jgmize avatar jgmize commented on July 28, 2024

Removed basic auth config from nginx on dev and prod environments after pushing latest master which includes the login_required homepage.

Performed the following from the python shell on dev:

Page.objects.update(login_required=True)

Prod does not have any Page objects yet.

from fxoss.

mlavin avatar mlavin commented on July 28, 2024

I was able to resolve this locally (running Nginx in front runserver) by disabling Basic Auth for only /admin/media-library/. This is part of the admin so it still requires the user is authenticated as a staff member. Here is the relevant part of the server block:

upstream fxoss {
    server 127.0.0.1:8000;
}

server {
...
    auth_basic "Restricted";
    auth_basic_user_file /home/mlavin/Projects/fxoss/users;

    location / {
        proxy_redirect      off;
        proxy_set_header    Host                    $host;
        proxy_set_header    X-Real-IP               $remote_addr;
        proxy_set_header    X-Forwarded-For         $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Protocol    $scheme;
        proxy_pass          http://fxoss;

        location ~* /admin/media-library/ {
            auth_basic off;
            proxy_pass http://fxoss;
        }
    }
...
}

from fxoss.

mlavin avatar mlavin commented on July 28, 2024

There were some comments that Uploadify works with Basic Auth in Chrome but I couldn't reproduce it with Chromium 32 on Ubuntu 12.04.

from fxoss.

daaray avatar daaray commented on July 28, 2024

This solve will allow for full auth/unauth QA on staging; great job! 🍬

from fxoss.

mlavin avatar mlavin commented on July 28, 2024

This has been resolved on dev and prod using a version of this change.

from fxoss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.