didierfred / SimpleModifyHeaders

Extension for firefox and chrome to modify headers
164 stars 30 forks source link

Localhost on Firefox doesn't seem to work #12

Closed Pluckerpluck closed 3 years ago

Pluckerpluck commented 5 years ago

Hey,

Running a simple python server on localhost:8000 and connecting to it using Firefox

Setting the URL pattern to http://localhost/* or http://127.0.0.1/* (and connecting to the corresponding url) doesn't set the headers I want

However, using no URL pattern and it modifies the headers correctly. Not sure if it's just a firefox thing though.


Also, can you support file://? If, in theory, the only thing holding that back is your regex then I can confirm that this also doesn't seem to work, as I disabled that for testing.

didierfred commented 5 years ago

Hi,

I did not manage to reproduce you problem . Could you give me the version of the module you are using ,the version of Firefox and an extract of your SimpleModifyHeaders configuration (use "export" button in the configuration panel) ?

I made some test using the following python code server and received the headers as wanted with url pattern set (http://localhost/ or http://127.0.0.1/)

from flask import Flask,request
app = Flask(__name__)

@app.route("/")
def headers():
    return "Headers received by server : " + str(request.headers)
Pluckerpluck commented 5 years ago

I can tell you I'm running Firefox 69.0a1, and v1.6.3 if the "about" button links to the right tag.

As for the rest, I'll get back to you. I'm away for a bit so can't actually reconfig the setup I used,

I can run the test myself to double check when I do get back. But to be clear, I'm connecting to something that's not on port 80, and currently haven't tested if it works on port 80.

Avinash-Bhat commented 4 years ago

@Pluckerpluck the URL-path shouldn't contain port. It is documented in the FF documentation. image

jockie commented 3 years ago

Works just fine for me using either http://localhost/ oder http://127.0.0.1 without a port number in FF 78 and Chrome 91. Rule then matches to every port on that host. Guess this issue can be closed.