robots added
modified: mysite/settings.py idk a dockploy modified: mysite/settings.py
This commit is contained in:
+22
-2
@@ -28,11 +28,20 @@ SECRET_KEY = os.getenv('DJANGO_KEY')
|
|||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
# Allow hosts from env, otherwise fall back to common local/dev hosts.
|
||||||
|
ALLOWED_HOSTS = [
|
||||||
|
'localhost',
|
||||||
|
'127.0.0.1',
|
||||||
|
'0.0.0.0',
|
||||||
|
'192.168.1.180',
|
||||||
|
'acidarchon.com',
|
||||||
|
'www.acidarcon.com',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
@@ -75,6 +84,13 @@ TEMPLATES = [
|
|||||||
WSGI_APPLICATION = 'mysite.wsgi.application'
|
WSGI_APPLICATION = 'mysite.wsgi.application'
|
||||||
|
|
||||||
|
|
||||||
|
REST_FRAMEWORK = {
|
||||||
|
'DEFAULT_RENDERER_CLASSES': [
|
||||||
|
'rest_framework.renderers.JSONRenderer',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
||||||
|
|
||||||
@@ -130,5 +146,9 @@ STATIC_ROOT = BASE_DIR / 'staticfiles'
|
|||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
|
|
||||||
|
# deplpoy security
|
||||||
|
|
||||||
|
SESSION_COOKIE_SECURE = True
|
||||||
|
|||||||
+26
-29
@@ -1,41 +1,38 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function () {
|
var requestOptions = {
|
||||||
const requestOptions = {
|
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
};
|
};
|
||||||
|
|
||||||
fetch('/doxme/', requestOptions) //call api
|
fetch('/doxme/', requestOptions) //call api
|
||||||
.then((response) => response.json())
|
.then(function (response) {
|
||||||
.then((jsonResponse) => {
|
return response.json();
|
||||||
const user_ip = jsonResponse.ip_info.ip;
|
})
|
||||||
const user_country = jsonResponse.ip_info.country;
|
.then(function (jsonResponse) {
|
||||||
const user_region = jsonResponse.ip_info.country_code;
|
var user_ip = jsonResponse.ip_info.ip;
|
||||||
|
var user_country = jsonResponse.ip_info.country;
|
||||||
|
var user_region = jsonResponse.ip_info.country_code;
|
||||||
// Update the HTML elements with the fetched information
|
// Update the HTML elements with the fetched information
|
||||||
document.getElementById('ip').innerText = `${user_ip}`;
|
document.getElementById('ip').textContent = ''.concat(user_ip);
|
||||||
document.getElementById('country').innerText = `${user_country}`;
|
document.getElementById('country').textContent = ''.concat(user_country);
|
||||||
document.getElementById('region').innerText = `${user_region}`;
|
document.getElementById('region').textContent = ''.concat(user_region);
|
||||||
|
|
||||||
console.log('user_ip:', user_ip);
|
console.log('user_ip:', user_ip);
|
||||||
console.log('couintry:', user_country);
|
console.log('couintry:', user_country);
|
||||||
console.log('region:', user_region);
|
console.log('region:', user_region);
|
||||||
|
|
||||||
// IPIS api
|
|
||||||
const city = jsonResponse.ipis.location.city;
|
|
||||||
const state = jsonResponse.ipis.location.state;
|
|
||||||
const isp = jsonResponse.ipis.company.name;
|
|
||||||
const longitude = jsonResponse.ipis.location.longitude;
|
|
||||||
|
|
||||||
console.log('city', city);
|
|
||||||
console.log('state', state);
|
|
||||||
console.log('isp', isp);
|
|
||||||
console.log('longitude', longitude);
|
|
||||||
|
|
||||||
// innerText
|
|
||||||
document.getElementById('isp').innerText = `${isp}`;
|
|
||||||
document.getElementById('city').innerText = `${city}`;
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch(function (error) {
|
||||||
console.error('Error fetching IP information:', error);
|
console.error('Error fetching IP information:', error);
|
||||||
});
|
});
|
||||||
|
fetch('http://ip-api.com/json/')
|
||||||
|
.then(function (response) {
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.then(function (data) {
|
||||||
|
var user_city = data.city;
|
||||||
|
var user_isp = data.isp;
|
||||||
|
console.log('user_city', user_city);
|
||||||
|
console.log('user_isp', user_isp);
|
||||||
|
document.getElementById('city').textContent = ''.concat(user_city);
|
||||||
|
document.getElementById('isp').textContent = ''.concat(user_isp);
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.log('idk error', err);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,9 +2,14 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}" />
|
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}" />
|
||||||
<link rel="stylesheet" href="{% static 'styles.css' %}" />
|
<link rel="stylesheet" href="{% static 'styles.css' %}" />
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
|
||||||
<title>Who are you?</title>
|
<title>Who are you?</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -16,6 +21,7 @@
|
|||||||
WHO R U?
|
WHO R U?
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<h2>IP Address:</h2>
|
<h2>IP Address:</h2>
|
||||||
|
|||||||
@@ -8,6 +8,42 @@ User-agent: Googlebot
|
|||||||
User-agent: AdsBot-Google
|
User-agent: AdsBot-Google
|
||||||
Disallow: /
|
Disallow: /
|
||||||
|
|
||||||
|
# AI
|
||||||
|
User-agent: GPTBot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: ChatGPT-User
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Google-Extended
|
||||||
|
Disallow: /
|
||||||
|
User-agent: PerplexityBot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Amazonbot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: ClaudeBot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Omgilibot
|
||||||
|
Disallow: /
|
||||||
|
User-Agent: FacebookBot
|
||||||
|
Disallow: /
|
||||||
|
User-Agent: Applebot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: anthropic-ai
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Bytespider
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Claude-Web
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Diffbot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: ImagesiftBot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Omgilibot
|
||||||
|
Disallow: /
|
||||||
|
User-agent: Omgili
|
||||||
|
Disallow: /
|
||||||
|
User-agent: YouBot
|
||||||
|
Disallow: /
|
||||||
|
|
||||||
#Example of how to block all crawlers
|
#Example of how to block all crawlers
|
||||||
User-agent: *
|
User-agent: *
|
||||||
Disallow: /
|
Disallow: /
|
||||||
|
|||||||
Reference in New Issue
Block a user