robots added

modified:   mysite/settings.py

idk

a

dockploy

	modified:   mysite/settings.py
This commit is contained in:
acidburnmonkey
2025-08-07 14:00:20 -04:00
committed by Acid
parent b984991cce
commit 815d3c9194
4 changed files with 98 additions and 39 deletions
+22 -2
View File
@@ -28,11 +28,20 @@ SECRET_KEY = os.getenv('DJANGO_KEY')
# SECURITY WARNING: don't run with debug turned on in production!
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
INSTALLED_APPS = [
'rest_framework',
'django.contrib.admin',
@@ -75,6 +84,13 @@ TEMPLATES = [
WSGI_APPLICATION = 'mysite.wsgi.application'
REST_FRAMEWORK = {
'DEFAULT_RENDERER_CLASSES': [
'rest_framework.renderers.JSONRenderer',
],
}
# Database
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
@@ -130,5 +146,9 @@ STATIC_ROOT = BASE_DIR / 'staticfiles'
# Default primary key field type
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# deplpoy security
SESSION_COOKIE_SECURE = True
+34 -37
View File
@@ -1,41 +1,38 @@
document.addEventListener('DOMContentLoaded', function () {
const requestOptions = {
var requestOptions = {
method: 'GET',
headers: { 'Content-Type': 'application/json' },
};
fetch('/doxme/', requestOptions) //call api
.then((response) => response.json())
.then((jsonResponse) => {
const user_ip = jsonResponse.ip_info.ip;
const user_country = jsonResponse.ip_info.country;
const user_region = jsonResponse.ip_info.country_code;
// Update the HTML elements with the fetched information
document.getElementById('ip').innerText = `${user_ip}`;
document.getElementById('country').innerText = `${user_country}`;
document.getElementById('region').innerText = `${user_region}`;
console.log('user_ip:', user_ip);
console.log('couintry:', user_country);
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}`;
};
fetch('/doxme/', requestOptions) //call api
.then(function (response) {
return response.json();
})
.catch((error) => {
console.error('Error fetching IP information:', error);
.then(function (jsonResponse) {
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
document.getElementById('ip').textContent = ''.concat(user_ip);
document.getElementById('country').textContent = ''.concat(user_country);
document.getElementById('region').textContent = ''.concat(user_region);
console.log('user_ip:', user_ip);
console.log('couintry:', user_country);
console.log('region:', user_region);
})
.catch(function (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);
});
});
+6
View File
@@ -2,9 +2,14 @@
{% load static %}
<html>
<head>
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}" />
<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>
</head>
@@ -16,6 +21,7 @@
WHO R U?
</h1>
<div class="container">
<div class="info">
<h2>IP Address:</h2>
+36
View File
@@ -8,6 +8,42 @@ User-agent: Googlebot
User-agent: AdsBot-Google
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
User-agent: *
Disallow: /