Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • d04f735
  • /
  • inst
  • /
  • configs
  • /
  • default
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:058d983eef6ec001ed8d79c0b2ff45fdd35427d3
directory badge
swh:1:dir:359d5bec19904806bc1cdc98f540208d783690a6

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
default
map $request_method $not_post {
	default 1;
	POST 0;
}

map $http_cache_control $opencpu_bypass_cache {
	"" 0;
	"no-cache" 1;
	default $not_post;
}

# Apache returns gzip for either deflate or gzip
map $http_accept_encoding $client_likes_gzip {
	default 0;
	"~gzip" 1;
	"~deflate" 1;
}
proxy_cache_path /var/phantasus/cache/nginx levels=1:2 keys_zone=opencpu:8m max_size=1000m inactive=1w;

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    gzip_min_length 5000;

    location / {
        root /var/www/html/;
        gzip on;
        gzip_vary on;
        gzip_types text/plain text/css application/json application/x-javascript text/javascript application/javascript;
        autoindex off;

        add_header Pragma public;
        add_header Cache-Control "no-cache, public, must-revalidate, proxy-revalidate";
    }

    location /phantasus/geo {
        gzip on;
        gzip_static on;
        gzip_vary on;
        gzip_types *;

        alias /var/phantasus/cache/geo/;
        try_files $uri =404;
        autoindex off;
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "no-cache, public, must-revalidate, proxy-revalidate";
    }

    location /phantasus/preloaded {
        gzip on;
        gzip_static on;
        gzip_vary on;
        gzip_types *;

        alias /var/phantasus/cache/preloaded/;
        try_files $uri =404;
        autoindex off;
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "no-cache, public, must-revalidate, proxy-revalidate";
    }

    location ~ /phantasus/ocpu/tmp/$ {
    	return 403;
    }

    location ~ /phantasus/ocpu/library/(?!phantasus) {
        return 403;
    }

    location /phantasus/ocpu {
        gzip on;
        gzip_types *;
        gzip_vary on;

        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_pass http://localhost:8001/phantasus/ocpu;
        proxy_redirect off;

        client_max_body_size 0;
        client_body_buffer_size 50k;
        proxy_connect_timeout       300;
        proxy_send_timeout          300;
        proxy_read_timeout          300;
        send_timeout                300;

        proxy_cache opencpu;
        proxy_cache_methods POST;
        proxy_cache_valid 400 404 5m;
        proxy_cache_valid 200 201 1w;
        proxy_cache_key "$request_method$request_uri$request_body";
        proxy_no_cache $request_body_file;
        proxy_buffers 8 32k;
        proxy_buffer_size 64k;
        proxy_ignore_headers Cache-Control;

        proxy_cache_bypass $request_body_file $opencpu_bypass_cache;
        proxy_no_cache $opencpu_bypass_cache;

        add_header X-ocpu-cache $upstream_cache_status;
    }
}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API