atrifat / nsfw-detector-api Goto Github PK
View Code? Open in Web Editor NEWA Simple PoC (Proof of Concept) of NSFW Detector API Server
License: MIT License
A Simple PoC (Proof of Concept) of NSFW Detector API Server
License: MIT License
Edge case, some image hosting service doesn't support HEAD
method to probe whether image file is exists.
Example:
curl -X HEAD https://void.cat/d/3Kyd4r7uL8fYCNtWF354f1.webp -vv
will give error 404
* using HTTP/2
* h2h3 [:method: HEAD]
* h2h3 [:path: /d/3Kyd4r7uL8fYCNtWF354f1.webp]
* h2h3 [:scheme: https]
* h2h3 [:authority: void.cat]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x564f82b5dc70)
> HEAD /d/3Kyd4r7uL8fYCNtWF354f1.webp HTTP/2
> Host: void.cat
> user-agent: curl/7.88.1
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 404
while using GET
will provide valid response:
> GET /d/3Kyd4r7uL8fYCNtWF354f1.webp HTTP/2
> Host: void.cat
> user-agent: curl/7.88.1
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 200
< date: Mon, 18 Sep 2023 00:52:26 GMT
< content-type: image/webp
< accept-ranges: bytes
< cache-control: public,max-age=86400
< x-frame-options: SAMEORIGIN
< content-disposition: inline; filename="The-development-of-coffee-fruits.png"
< strict-transport-security: max-age=15724800; includeSubDomains
Add an optional environment variable such as ENABLE_CONTENT_TYPE_CHECK=false
to control behavior of app whether to probe using HEAD to get content info or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.