Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Gabriel Weisse
/
presupuestov1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
pr0nstar
2026-08-18 12:27:30 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4e056817897cdec169d7ebf38eeb2cce9a12ed0d
4e056817
1 parent
52ea98c7
cache off
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
main.py
main.py
View file @
4e05681
...
...
@@ -36,16 +36,16 @@ app = FastAPI(
plugins
.
RequestIdPlugin
(),
)
),
Middleware
(
CacheMiddleware
,
cache
=
cache
.
cache
,
rules
=
[
Rule
(
match
=
re
.
compile
(
r"^/presupuesto/api/_metrics/.*"
),
ttl
=
0
),
Rule
(
match
=
re
.
compile
(
r"^/presupuesto/api/search/.*"
),
ttl
=
0
),
Rule
(
match
=
re
.
compile
(
r"^/presupuesto/api/programa_proyecto/.*"
),
ttl
=
0
),
Rule
(
match
=
re
.
compile
(
r'^/presupuesto/api/.+'
),
ttl
=
86400
,
status
=
200
),
],
),
#
Middleware(
#
CacheMiddleware,
#
cache=cache.cache,
#
rules=[
#
Rule(match=re.compile(r"^/presupuesto/api/_metrics/.*"), ttl=0),
#
Rule(match=re.compile(r"^/presupuesto/api/search/.*"), ttl=0),
#
Rule(match=re.compile(r"^/presupuesto/api/programa_proyecto/.*"), ttl=0),
#
Rule(match=re.compile(r'^/presupuesto/api/.+'), ttl=86400, status=200),
#
],
#
),
],
root_path
=
'/presupuesto/api'
)
...
...
@@ -63,7 +63,7 @@ app.include_router(daily.router)
app
.
include_router
(
search
.
router
)
app
.
include_router
(
private_metrics
.
router
)
metrics
.
install
(
app
)
#
metrics.install(app)
# @app.on_event('startup')
...
...
Please
register
or
login
to post a comment